Free Support Forum - aspose.com

Save Excel to CSV and get full number precision

Hello

When I save the excel to csv the format of the cell gets applied and loosing the number precision.The number of files i am doing this excel to csv conversion is about 250 .xls[xm] and all of them are of different format and hence do not want to remove formating for each cell.

Also want to leave the cells with date format as is.

Thanks

Shami

Hi Shami,


Thank you for contacting Aspose support.

I am afraid, this is the default behavior of Excel application to export the display format to CSV. As Aspose.Cells APIs follow Excel’s guidelines and specifications therefore when you export the spreadsheets to CSV the values are exported as they are displayed in Excel’s GUI. Unfortunately, there are no methods to override the export to tackle your scenario. However, as you have mentioned, if you know which columns have what format, you can set/remove the style for that particular column(s) to show the numbers with maximum precision while leaving other columns intact.