excel - Java - Read xls as text without point value -
I am reading XLS file as below:
POIFSFileSystem fs = new POIFSFileSystem ( New file inputstream (filename)); HSSFWorkbook wb = New HSSFWorkbook (fs); HSSFSheet Sheet = wb.getSheetAt (0); HSSFRow rowTPNB; HSSFcell cellTPNB; RowTPNB = Sheet.Getrev (5); CETPNB = RowTPNB .getCell (1); With that code I am getting a value from Excel which is like this from 76653764 to 7.6653764E7 . How do I create a value for 76653764 ? Please advise
You can do it like this
Double.valueOf ("7.6653764E7"). LongValue ();
This will return a long value and remove scientific notation :)
Comments
Post a Comment