-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date format 55 not detected as a date in .xls file #541
Comments
From openoffice.org:
According to [ECMA-376] part 4, section 3.8.30, these are different depending on the current locale. So one set of values when current locale is CHT, JPN or KOR. In xlsx files there seems to be an attribute for this, but which one does old Excel versions use? |
Looks like NumberFormat.Parser class needs to be aware of the locale as specified between the [] characters. So we correctly handle the characters G and E in the above formats. See [ECMA-376] part 4, section 3.8.30. Apparently when using Japanese characters you don't have to enclose them in ". What are the rules here? @andersnm Do you have any suggestions on how to best handle this? |
Based on a quick test Excel allows you to use pretty much anything as a literal without quotes unless it means something in the format syntax. |
Hi @appel1, Here's the same literals issue in the ExcelNumberFormat bugtracker: andersnm/ExcelNumberFormat#30 I started looking into it, but couldn't find a quick fix so its in the backlog for now. |
Thai from [ECMA-376]
|
Perhaps this can be solved in two parts. The first where we change to determine whether a cell is a DateTime by looking at the number format index for the built-in formats instead of going via the format string. Then we'd need to change GetNumberFormatString to be culture aware and also provide an overload where you specify a culture. Not sure how to handle the breaking change since it looks like the formats that are hardcoded now are en-us or something similar? |
Related to #543 |
Looks like we're missing some built-in formats. 0-163 are reserved for built-in formats but we only have up to 49. 55 looks to be a date when saving with Excel on a computer set to Japanese.
Need to find out if these are documented anywhere.
The text was updated successfully, but these errors were encountered: