Skip to content

Deterministic Excel generation#982

Merged
michelebastione merged 3 commits into
mini-software:masterfrom
michelebastione:deterministic-generation
Jul 5, 2026
Merged

Deterministic Excel generation#982
michelebastione merged 3 commits into
mini-software:masterfrom
michelebastione:deterministic-generation

Conversation

@michelebastione

Copy link
Copy Markdown
Collaborator

This PR addresses the niche problem of deterministic file generation, previously undermined by the assignment of random Guids
to the ids of worksheets and drawings in their respective .rels files. The change implemented makes them sequential thus solving the issue.

Resolves #980

Generated Excel files are now always consistent when the data source is the same, save for the metadata of the zip entries.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Zomp.SyncMethodGenerator package and refactors the OpenXml writer to support deterministic file generation by replacing random GUIDs with index-based IDs and minifying XML dynamically. The review feedback highlights a critical bug in GenerateWorkbookItems where a StringBuilder is declared outside a loop, causing drawing relationships to accumulate across sheets. Additionally, it is recommended to sort the content types dictionary by key to guarantee determinism.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/MiniExcel.OpenXml/Writer/OpenXmlWriter.XmlGeneration.cs Outdated
Comment thread src/MiniExcel.OpenXml/Constants/ExcelXml.cs Outdated
@michelebastione michelebastione force-pushed the deterministic-generation branch from 8af9562 to 0231b09 Compare July 5, 2026 21:17
@michelebastione michelebastione merged commit 3266e8b into mini-software:master Jul 5, 2026
3 checks passed
@michelebastione michelebastione deleted the deterministic-generation branch July 5, 2026 21:22
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.

Determinism

1 participant