david850067064 / as3xls

Automatically exported from code.google.com/p/as3xls
0 stars 0 forks source link

Sometimes,I can not read the number in the Excel exactly! #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new excel file
2. Enter number 356601.60 or 7800.9
3. User com.as3xls.xls.Sheet's method "getCell(row, col).value" read that excel 
file

What is the expected output? What do you see instead?
the expected output: 356601.60 or 7800.9
I saw : 356601.92 or 7800.91

What version of the product are you using? On what operating system?
as3/win7

Please provide any additional information below.
Part of the code:
var excelFile:ExcelFile = new ExcelFile();
excelFile.loadFromByteArray(e.target.data);
Sheet sheet = excelFile.sheets[0];
sheet.getCell(0,i+5).value;//issues

Original issue reported on code.google.com by xiangby...@gmail.com on 20 Mar 2014 at 10:11

GoogleCodeExporter commented 9 years ago
Using the djw fork of this library (https://github.com/djw/as3xls) we found a 
similar problem when reading the value 0.015 from an Excel file. It was read as 
0.02 (whereas 0.016 was read correctly, as was 0.01501).

I have tracked this down to the readRK() function in com.as3xls.xls.ExcelFile 
which did not seem to mask off bits 30 and 31 for non-integer values and it 
rounded when dividing by 100.

Original comment by johnclar...@rad3.com on 18 Aug 2014 at 1:46

Attachments: