I have a CSV file with some formats(eg: leading with '0’s). When I open with excel, the format lost. Is it possible to keep the format when open csv file with Aspose.Cells for NET. Thanks
Thanks for your posting and using Aspose.Cells.
If you want to preserve leading zeros, then please set the TxtLoadOptions.ConvertNumericData=false while loading your csv file inside the workbook object.
Please see the following code. I have attached the output xlsx file generated by it for your reference.
string filePath = @“F:\Shak-Data-RW\Downloads\sample.csv”;
TxtLoadOptions options = new TxtLoadOptions();
options.ConvertNumericData = false;
Workbook workbook = new Workbook(filePath, options);
workbook.Save(filePath + “.out.xlsx”);
Thanks. It works well