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

Free Support Forum - aspose.com

Read CSV file with newline into Excel workbook with .NET using C#


I am using the version of aspose.cells.

When I try to parse the file using ExportDataTableAsString method from Workbook.Worksheets[0].Cells, the parsing is not done properly.

Does Aspose.Cells supports newline in csv field?



Thanks for providing us the template file.

We found the issue after an initial test, we will look into it soon.

Your issue has been logged into our issue tracking system with an issue id: CELLSNET-14770.

We will figure it out soon.

Thank you.


Please try the attached version/fix, we have fixed your mentioned issue.

Thank you.

The issues you have found earlier (filed as 14770) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.


I still have a problem with line returns in CSV field using Aspose.Cells 4.9.0.

Aspose.Cells doesn't throw an error, but the field value (that contains line return) returned by Aspose.Cells lacks the first character of each line.

Example :

I have this row in the CSV :


Aspose will return the value :


I think it's a very important bug (because there is no error) and data are not read correctly.

Can you confirm and make a patched version of the DLL for .NET 2.0 ?



I have tested your scenario a bit but could not find the issue. Could you post your template file(s) and paste sample code here to reproduce the issue, we will check it soon.

Thank you.

Did you try using the method ExportDataTableAsString ?

I've attach a test file.

Row 2 :
you get :
Default value from field
aut de ligne

instead of :
Default value from field
saut de ligne

Row 4 :
You get an error occured since the char " is the only char of the last row multiline field, and the first char is removed, that seems to break your parser.

Please let me know.


Yes, I am using Cells.ExportDataTableAsString method.

Kindly give us your sample code to reproduce the issue, we will check your issue soon.

Thank you.

This is the code that we are using :

workbook.Open(filename, ";");

int rowNumber = workbook.Worksheets[0].Cells.MaxDataRow + 1;
int columnNumber = workbook.Worksheets[0].Cells.MaxDataColumn + 1;

DataTable reader = workbook.Worksheets[0].Cells.ExportDataTableAsString(0, 0, rowNumber, columnNumber, true);

for (int i = 0; i < reader.Columns.Count; i++)
var colName = reader.Columns[i].ColumnName;
var colValue = readerRow[colName] as string;


We will look into it and get back to you soon.

Thank you.

Can you elaborate a bit more, what does mean "soon" ?

This problem is a regression and corrupt our datas so I think it's a major bug !

Also there is no workaround !

Can you give me a delay for the patch please ?



We have fixed your mentioned issue. Kindly try the attached version.

Kindly let us know if you still find the issue.

Thank you.

It works great, thanks for the quick fix.

The issues you have found earlier (filed as 16011) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.