Incorrect Float Value while reading a sheet

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
Louis
Posts: 1
Joined: Wed Sep 13, 2023 2:21 pm

Incorrect Float Value while reading a sheet

Post by Louis »

Hello,

While trying to read a cell with float inside, like 10.01 for example, when using :
-> xl.Sheets|sheetNumber].AsFloat[col,line];
We are getting '10.0101' instead of '10.01'.

Even when getting the cell with xl.Sheets|sheetNumber].AsString[col,line] we ar getting the wrong result.
When looking in the sheet, the float value is correct, we do not have a precision error.

Is there a setting to add or an other way for us to get the exact value?

We are using XLSReadWrite 6.01.15
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Incorrect Float Value while reading a sheet

Post by larsa »

Hello

XLSReadWriteII reads the values stored in the file. Excel may format these values so they may not be exactly the same.
Lars Arvidsson, Axolot Data
Post Reply