Skip to content

Instantly share code, notes, and snippets.

@duncan-bayne
Created September 3, 2015 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duncan-bayne/35a52bac64e72f3d7ee2 to your computer and use it in GitHub Desktop.
Save duncan-bayne/35a52bac64e72f3d7ee2 to your computer and use it in GitHub Desktop.
Rounding issue in XLSX date cells
<sheetData>
<row r="1" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
<c r="A1" s="1" t="n">
<v>41552</v>
</c>
</row>
<row r="2" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
<c r="A2" s="1" t="n">
<v>41551.9999999998</v>
</c>
</row>
</sheetData>
@duncan-bayne
Copy link
Author

If you extract the above XLSX with xlsx2csv, one date comes out as midnight, the other 23:59:59:

$ xlsx2csv test.xlsx
05/10/2013 00:00:00
04/10/2013 23:59:59

... and yet they both display as 05/10/2013 00:00:00 in the spreadsheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment