Skip to content

feat(xls): support optional zero-based byte numbering - #937

Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
ebroecker:developmentfrom
timothyanderson096-ocdealcheck:feat/xls-byte-index-812
Open

timothyanderson096-ocdealcheck wants to merge 1 commit into
ebroecker:developmentfrom
timothyanderson096-ocdealcheck:feat/xls-byte-index-812

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown
Contributor

Related to #812.

Add xlsExportByteBase and xlsImportByteBase (integer 0 or 1) for XLS/XLSX. Both default to 1, preserving existing spreadsheets and conversions. For example:

canconvert --xlsExportByteBase 0 input.dbc output.xlsx
canconvert --xlsImportByteBase 0 output.xlsx restored.dbc

Only the displayed byte number changes; bit numbering and signal positions are preserved. Separate settings also allow one-based input to become zero-based output in a single conversion. The input base is explicit rather than inferred from the smallest signal byte, since a zero-based workbook may have no signal in byte 0. CSV output is unchanged.

Regression coverage checks both Excel formats, all three Motorola bit modes, unaligned signals, both value-table layouts, empty-frame rows, unchanged worksheet cells, CLI conversions with signals starting after byte 0, and invalid settings. Before implementation, the new API cases produced 36 failures and one passing CSV control; all eight new CLI cases failed because the flags were absent.

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

  • tox -e gh: 424 passed, 1 skipped.
  • Wheel and source archive build: passed.
  • python -m twine check --strict dist/*: both passed.
  • git diff --check: passed.

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


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

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.

1 participant