Skip to content

Handle duplicate number format records by using the first one.#455

Merged
andersnm merged 2 commits into
ExcelDataReader:developfrom
appel1:issue454
Jul 2, 2020
Merged

Handle duplicate number format records by using the first one.#455
andersnm merged 2 commits into
ExcelDataReader:developfrom
appel1:issue454

Conversation

@appel1

@appel1 appel1 commented Dec 30, 2019

Copy link
Copy Markdown
Collaborator

Fixes #454

private void ReadWorkbookGlobals(XlsBiffStream biffStream)
{
XlsBiffRecord rec;
var biffFormats = new Dictionary<ushort, XlsBiffFormatString>();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FYI, the purpose of the temporary biffFormats dict was to make sure the CODEPAGE record is parsed before decoding the format strings. The new code assumes the CODEPAGE record comes before the FORMAT records. It's probably OK as-is by the spec, although I'd be happier if we could revert these changes in XlsWorkbook.cs before merging

…ase there are any format records before the codepage record.
@andersnm andersnm merged commit bc7ae9e into ExcelDataReader:develop Jul 2, 2020
@appel1 appel1 deleted the issue454 branch March 26, 2021 08:59
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.

Handle files with duplicate number formats for .xlsx

2 participants