Skip to content

Support CSV and .xlsm inputs in generator and add CSV parsing/tests - #58

Merged
0x5143 merged 3 commits into
masterfrom
codex/-csv-xlsm
Jul 17, 2026
Merged

Support CSV and .xlsm inputs in generator and add CSV parsing/tests#58
0x5143 merged 3 commits into
masterfrom
codex/-csv-xlsm

Conversation

@0x5143

@0x5143 0x5143 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Extend the generator to accept additional input formats (.csv and .xlsm) so tables can be authored as CSV or macro-enabled workbooks and processed by the same pipeline.

Description

  • Update documentation to mention .xlsm and .csv input support and add the new patterns to example dotnet dtgen invocations and README text.
  • Add IsSupportedInputFile and restrict file enumeration to formats the generator actually supports (.xlsx, .xlsm, .csv).
  • Introduce CreateWorkbook, GetCsvSheetName, and ReadCsvRows to map a CSV file into a single in-memory XSSFWorkbook worksheet and reuse the existing workbook parsing logic.
  • Replace direct new XSSFWorkbook(stream) usage with a call to CreateWorkbook in GenerateExcel, and add InputFormatGenerationTests unit tests covering CSV and .xlsm inputs.

Testing

  • Ran InputFormatGenerationTests.CsvInput_ShouldGenerateCodeAndData which created a CSV, invoked the generator, and asserted generated DRItem.cs and DRItem.bytes, and the test passed.
  • Ran InputFormatGenerationTests.XlsmInput_ShouldGenerateCodeAndData which created an .xlsm workbook, invoked the generator, and asserted generated DRItem.cs and DRItem.bytes, and the test passed.

Codex Task

@0x5143
0x5143 merged commit 6ace1a5 into master Jul 17, 2026
2 checks passed
@0x5143
0x5143 deleted the codex/-csv-xlsm branch July 17, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants