We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with single quote on opening CSV

Hi

I have a csv file with some tab separated values. One value is '3-14
I open this csv and save it as xlsx. Then I open the xlsx in Excel. The value is showing as '3-14. If I press enter in this cell, then the value 3-14 (without single quote) will be displayed.
How can I achieve it, that 3-14 will be displayed without press enter?

If the csv don’t have the single quote, excel will interprete this as date. That’s also not what I want.

Thank you

Hi,

Thanks for your posting and using Aspose.Cells.

As a workaround, you can use the following code. I have tested it and it works fine. Let us know your feedback.

C#
//Suppose C1 contains '3-14
Cell cell = sheet.Cells[“C1”];
cell.PutValue(cell.StringValue);