Excel Inappropriate Number Format Substitution #4532
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My system short date format is set to
yyyy-mm-dd
. I used Excel to create a spreadsheet, and included some dates, specifyingyyyy-mm-dd
formatting. When I looked at the resulting spreadsheet, I was surprised to see that Excel had stored the style not asyyyy-mm-dd
, but rather as builtin style 14 (system short date format). Apparently the fact that the Excel styling matched my system choice was sufficient for it to override my choice! This is an astonishingly user-hostile implementation. Even though there are formats which, by design, "respond to changes in regional date and time settings", and even though the format I selected was not among those, Excel decided it was appropriate to vary the display even when I said I wanted an unvarying format.This PR adds a new method
replaceBuiltinNumberFormat
to undo the damage that Excel does in such a situation. It also adds anExcel Anomalies
document to the formal documentation, just to make situations like this readily available to the community.BTW, Excel's sabotage can be avoided by using a number format style like
[Black]yyyy-mm-dd
.This is:
Checklist: