Free Support Forum - aspose.com

String value is automatically converted to numeric

hi,
I have a csv file which contain String column that contains 2017-Jul
data like this but when i pass that csv to aspose it is converting it to 42917
I dont want this conversion.
Any method or any way to stop this conversion.
Thanks

@kedar.675,

Thanks for your query.

Could you try to set the relevant options in TxtLoadOptions to false while loading the CSV file into Workbook object, see the sample code for your reference:
e.g
Sample code:

TxtLoadOptions opts = new TxtLoadOptions();

        opts.ConvertNumericData = false;
        opts.ConvertDateTimeData = false;

        Aspose.Cells.Workbook doc = new Aspose.Cells.Workbook("e:\\test2\\2.csv", opts); 

Hope, this helps a bit.

Its working …!
Thanks Amjad really appreciate your help and quick response.

@kedar.675,

Good to know that your issue is sorted out by the suggested code segment. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.