Reply to topic  [ 3 posts ] 
8 digit Negative number corrupting 
Author Message

Joined: Sun Jul 13, 2008 10:00 pm
Posts: 4
Reply with quote
Post 8 digit Negative number corrupting
Hi,
I am using the easy xls to read the data from xls file.

I am facing some problem while exporting some 8 digit Negative number from xls sheet.

It is working Fine with less than 8 digit and more 8 digit negative number. For some 8 digit Negative number it is corrupting the number.

I am attching in put output data for excel sheet and the code for extracting the value from excel sheet.

Input In excel sheet:

INPUT OUTPUT
------- -----------
-54000001 At row 1, column 1 the value is '1019741823'
-54000002 At row 2, column 1 the value is '1019741822'
-54000003 At row 3, column 1 the value is '1019741821'
-54000004 At row 4, column 1 the value is '1019741820'
-54000005 At row 5, column 1 the value is '1019741819'
-54000006 At row 6, column 1 the value is '1019741818'
-54000007 At row 7, column 1 the value is '1019741817'
-54000008 At row 8, column 1 the value is '1019741816'
-54000009 At row 9, column 1 the value is '1019741815'
-54000010 At row 10, column 1 the value is '1019741814'
-54000011 At row 11, column 1 the value is '1019741813'
-54000012 At row 12, column 1 the value is '1019741812'
-54000013 At row 13, column 1 the value is '1019741811'
-54000014 At row 14, column 1 the value is '1019741810'
-54000015 At row 15, column 1 the value is '1019741809'
-54000016 At row 16, column 1 the value is '1019741808'
-54000017 At row 17, column 1 the value is '1019741807'
-54000018 At row 18, column 1 the value is '1019741806'
-54000019 At row 19, column 1 the value is '1019741805'
-54000020 At row 20, column 1 the value is '1019741804'
-54000021 At row 21, column 1 the value is '1019741803'
-54000022 At row 22, column 1 the value is '1019741802'
-54000023 At row 23, column 1 the value is '1019741801'
-54000024 At row 24, column 1 the value is '1019741800'
-54000025 At row 25, column 1 the value is '1019741799'
-54000026 At row 26, column 1 the value is '1019741798'
-54000027 At row 27, column 1 the value is '1019741797'
-54000028 At row 28, column 1 the value is '1019741796'
-54000029 At row 29, column 1 the value is '1019741795'
-54000030 At row 30, column 1 the value is '1019741794'
-54000031 At row 31, column 1 the value is '1019741793'


Below number are working fine:
------------------------------------
-40000000
-42000000
-44000000
-46000000
-48000000
-50000000
-52000000
-54000000

-10500000
-10500000
-10500000
-10500000

-33600000
-33600000
-8000000
-10800000
-10800000


Code:
import java.io.FileInputStream;
import java.math.BigDecimal;
import java.sql.ResultSet;
import EasyXLS.*;

public class Tutorial31 {



  public static void main(String[] args) {
    try {
      System.out.println("Tutorial 31");
      System.out.println("----------");
      Double d1 = new Double("324324");
      BigDecimal bg = new BigDecimal(4353);
     
      //Create an instance of the object that generates Excel files
      ExcelDocument xls = new ExcelDocument();

      //Read the file
      System.out.println("Reading file C:\\temp\\BigNoHQ1.xls");
      FileInputStream file = new FileInputStream("C:\\temp\\BigNoHQ1.xls");
      ResultSet rs = xls.easy_ReadXLSSheet_AsResultSet(file, "Hierarchy-Goal");
      //Display the values
      int columnCount = rs.getMetaData().getColumnCount();
      int row = 0;
      while (rs.next()){
        for (int column=1; column<=columnCount; column++)
          System.out.println("At row " + (row + 1) + ", column " + (column) +
                             " the value is '" + rs.getBigDecimal((column)).toPlainString() + "'");
        row++;
      }
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }
}


can you please tell me how to resolve tish issue?

Thanks & Regards,
Smruti Ranjan Patra


Sun Jul 13, 2008 10:25 pm
Profile YIM

Joined: Fri Feb 03, 2006 12:23 pm
Posts: 189
Location: Brasov, Romania
Reply with quote
Post 
The defect was fixed staring with version 6.2.


Mon Jul 14, 2008 3:29 am
Profile WWW

Joined: Sun Jul 13, 2008 10:00 pm
Posts: 4
Reply with quote
Post 
Do we need to update the license or there is any patch available?


Sat Jul 19, 2008 5:36 am
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.