In these cases we now check the implicit ids and are able to resolve the format codes.
I know this library tries to be very selective of what formatting to include for performance reasons, but IMO this is important piece of information to know when reading the Excel file. The simple map-lookup shouldn't be much of a performance overhead, and it will only be performed when withCellFormat=true is specified in ReadingOptions.
I haven't quite familiarised myself with all the coding standards and conventions in this library, so not sure if the map-constant should be moved out to a separate class or what, please let me know 😊
This PR is trying to address the issue https://github.com/dhatim/fastexcel/issues/328.
The OpenXml spec contains some implicit number format codes that is not explicitly saved in the file. This causes the current functionality to be unable to resolve the format for certain number format ids: https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformat?view=openxml-2.8.1
This means a
styles.xml
file can contain something like this without havingnumFmt
elements at all:In these cases we now check the implicit ids and are able to resolve the format codes.
I know this library tries to be very selective of what formatting to include for performance reasons, but IMO this is important piece of information to know when reading the Excel file. The simple map-lookup shouldn't be much of a performance overhead, and it will only be performed when
withCellFormat=true
is specified inReadingOptions
.I haven't quite familiarised myself with all the coding standards and conventions in this library, so not sure if the map-constant should be moved out to a separate class or what, please let me know 😊