Skip to content

Fixed issue with generated documents unable to be accessed thrugh OleDb connector#962

Merged
michelebastione merged 2 commits into
mini-software:masterfrom
michelebastione:fix-issue-759
May 17, 2026
Merged

Fixed issue with generated documents unable to be accessed thrugh OleDb connector#962
michelebastione merged 2 commits into
mini-software:masterfrom
michelebastione:fix-issue-759

Conversation

@michelebastione
Copy link
Copy Markdown
Collaborator

Added required attributes to empty cellXfs style elements in DefaultSheetStyleBuilder and MinimalSheetStyleBuilder .
OleDb requires these <xf> elements to be well formed in order to successfully estabilsh a connection to the Excel document.

Fixes #759

Copy link
Copy Markdown
Contributor

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

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 OpenXml style builders to include mandatory attributes (numFmtId, fontId, fillId, borderId, and xfId) in xf elements to improve compatibility with tools like OleDb. Additionally, it refactors a large number of asynchronous tests to use non-blocking patterns such as ToListAsync and await foreach instead of ToBlockingEnumerable. Feedback was provided regarding the MinimalSheetStyleBuilder to reduce code duplication by using a local helper function for writing xf elements and to ensure consistency in loops not covered by the current diff.

Comment thread src/MiniExcel.OpenXml/Styles/Builder/MinimalSheetStyleBuilder.cs
…le builders

OleDb requires these `<xf>` elements to be well formed in order to successfully estabilsh a connection to the Excel document
@michelebastione michelebastione merged commit b4e5ab6 into mini-software:master May 17, 2026
3 checks passed
@michelebastione michelebastione deleted the fix-issue-759 branch May 17, 2026 00:46
michelebastione added a commit that referenced this pull request May 17, 2026
…e builders

Mirrors #962 on the maintenance branch to fix OleDb unable to connect to documents generated through MiniExcel
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.

OLEDB External table is not in the expected format.

1 participant