#7230 closed defect (fixed)
XLSX-export: trailing zeros make trouble with Excel
Reported by: | TobWen | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.4 |
Component: | OGR_SF | Version: | |
Severity: | normal | Keywords: | |
Cc: |
Description
(as discussed on IRC)
When writing XLSX using ogr2ogr, double get casted to float. These floats might create problems when loading the file in Microsoft Excel.
Here is a working patch to fix this problem. Thanks to the guys in #c++ on freenode.
Attachments (1)
Change History (6)
by , 5 years ago
Attachment: | xlsx_patch.diff added |
---|
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Yeah, I wrote about %.16g in the channel yesterday. But it might work up to 1016 only. I'll try and report soon. My patch works for 100%, tested on some hundred thousand lines :)
comment:5 by , 5 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 2.2.4 |
Version: | svn-trunk |
Note:
See TracTickets
for help on using tickets.
%.16g instead of %.16f should be equivalent to your patch. But did you check that Excel will be happy with the scientific notation that will be output for small or big numbers, like 1.23456e-20