Opened 5 years ago
Closed 5 years ago
Last modified 5 years ago
#7230 closed defect (fixed)
XLSX-export: trailing zeros make trouble with Excel
|Reported by:||TobWen||Owned by:||warmerdam|
(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.
Change History (6)
by , 5 years ago
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:3 by , 5 years ago
|Status:||new → closed|
comment:4 by , 5 years ago
comment:5 by , 5 years ago
|Component:||default → OGR_SF|
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