Skip to content

feat(compare): export comparison reports to XLSX - #938

Merged
ebroecker merged 2 commits into
ebroecker:developmentfrom
timothyanderson096-ocdealcheck:feat/compare-xlsx-447
Oct 23, 2026
Merged

ebroecker merged 2 commits into
ebroecker:developmentfrom
timothyanderson096-ocdealcheck:feat/compare-xlsx-447

Conversation

@timothyanderson096-ocdealcheck

@timothyanderson096-ocdealcheck timothyanderson096-ocdealcheck commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #447. Implements the Excel comparison report requested in #443.

cancompare --output changes.xlsx old.dbc new.dbc

Add --output / -o and dump_result_xlsx() to write a filterable report with Object, Property, Change, Old value and New value columns. The report traverses the existing CompareResult tree and respects the current comment, attribute and value-table filters. It adds no new comparison rules. Existing console output remains available.

Populate one-sided change values for transmitters, receivers, definitions and global value tables so the report identifies the actual added/removed value. Their console output is unchanged. Legacy value-table/signal-group change pairs are also handled. Named global tables and definitions retain their identity, and custom attributes can share structural node names without being mistaken for those objects. Added/removed named objects show their names; the report is not a full database export.

All cells are literal text, preserving Unicode, decimal precision and strings beginning with =. The report is written before the existing console formatter mutates string values. Values over Excel's 32767-character cell limit fail before saving; equal databases produce headers only. Excel dependencies remain optional, with an actionable CLI error when absent. --frames and non-XLSX output paths are rejected explicitly.

Validation on Linux, Python 3.13.16, based on development 06e852d:

  • tox -e gh: 397 passed, 1 skipped, including 18 report cases.
  • Wheel and source archive build, plus twine check --strict: passed.
  • Console comparison without openpyxl: passed.
  • Console output matched unmodified development for the change/addition/removal fixture.
  • git diff --check: passed.

Windows/macOS and other Python-version jobs remain for upstream CI. Prepared and checked with AI assistance.


Timothy Anderson — Spotted Ridge Engineering / OC Labs
GDN — Global Decision Network
timothyanderson096@gmail.com · Engineering evidence

@ebroecker
ebroecker merged commit 24cff38 into ebroecker:development Oct 23, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cancompare: xlsx output

2 participants