Hi
Hi,
Thanks for your posting and using Aspose.Cells.
If you write 123456789123 to a file and change its extension to csv and then open it in Microsoft Excel, you will find that it is shown in scientific notation.
So, this is not a bug of Aspose.Cells but a correct behavior of both Aspose.Cells and MS-Excel.
If you want to get rid of it, then append apostrophe ’ before the number.
i.e
’123456789123
Hi,
Thanks for using Aspose.Cells.
As a workaround, you can first convert your number into string and then save your workbook into csv format.
Please see the following sample code that explains this method. I have attached the source excel file used in this code and the output csv file generated by it for your reference.
Java
String filePath = “F:\Shak-Data-RW\Downloads\source.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get(“A1”);
cell.putValue(cell.getStringValueWithoutFormat());
workbook.save(“output.csv”);
Thanks for the workaround and the quick response!
Hi,