Hi,
Hi,
I think you may use Cell.getStringValue() or Cell.getDoubleValue() etc instead of directly using Cell.getValue() for your scenario, it works fine.
e.g
Workbook excel=new Workbook();
excel.open(“d:\files\Bok1.xlsx”);
Worksheets worksheets = excel.getWorksheets();
Worksheet worksheet = worksheets.getSheet(0);
//The results are commented here.
System.out.println(worksheet.getCells().getCell(“A1”).getStringValue());// 40.00 as string value
System.out.println(worksheet.getCells().getCell(“A1”).getDoubleValue()); //40.0
System.out.println(worksheet.getCells().getCell(“A1”).getValueType()); //2 ->DateTime
System.out.println(worksheet.getCells().getCell(“A1”).isDateStyle()); //true
Thank you.
Hi,
If I simply select a different currency, like $ in the accounting formatting option instead of CHF everything works as intended and a number is returned from the cell. It really shouldn’t be the case that the choice of currency will change the value type of the cell.
Hi,
Yes, we have found the invalid value returned for Cell.getValueType(). We will fix it soon.
Your issue has been logged into our issue tracking system with an issue id: CELLSJAVA-17355.
Thank you.
Hi,
Please try the attached version. We have fixed your issue.
Thank you.
Thanks,
The issues you have found earlier (filed as 17355) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.