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

Free Support Forum - aspose.com

Problem reading data using Aspose.Cells v4.5.0.0


I am trying to read data from a CSV file, cell by cell. On each cell, I am reading the cell’s value using the following code:

strTemp = sheet.Cells[row, col].Value.ToString();

This works fine, until the value resembles a date string. Below are some examples of real data, and what Aspose reads the value as. Keep in mind that the CSV Value is NOT a date value (it’s a customer code), and should not be converted into any datetime format:

CSV Value______Aspose Translation (strTemp)______isCorrect


21-9-1101______21-9-1101 _____________________YES


6-9-1108_______7/9/1108 12:00:00 AM ___________NO

7-9-1904 ______1652 __________________________NO

Is there any way to disable whatever conversion is happening to cause this problem?


I’ve just confirmed that the problem is also present in v4.5.1.0


Could you post your .csv file, we will check your issue soon.

Thank you.


Could you try the attached version if it fixes your issue.

Note: In the fix, we have set the number format "m-d-yyyy" for the data that you have listed in your previous post. But, if the year < 1900 or the month > 12, we won't set the number format for it.

Thank you.