Quantcast
Channel: Excel Data Reader - Read Excel files in .NET
Viewing all articles
Browse latest Browse all 448

Commented Issue: Exponential problem when load a .xlsx [11773]

$
0
0
I try to load a .xlsx and the decimal number like 2345,12 look like 2,345123637347E+16, i need fix that faster, what can i do?
Comments: ** Comment from web user: larbou **

Yes, indeed, i got the same problem when i try to load my worksheet when i use a coma for decimal separator.
When the software unzip the content of ../xl/worksheets/sheet1.xml the value are like this 321.521 and when iopen my xlsx file the values has coma decimal separator like 321,521.
I has debud the process and it try to parse the string (321.521) to double but your regional setting don't allow to convert this string to double with a dot decimal separator.

exactly the code is :

double number;
object o = _xmlReader.Value;
if (double.TryParse(o.ToString(), out number))
o = number;
....

i have try to shortcut the double parsing, but i got bad number format
for ex: 231.99 became 321.9899999999992

i don't have solution for the moment... i search to solve this ASAP.

other else if i convert my file to XLS format, it work correctly.


Viewing all articles
Browse latest Browse all 448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>