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

Hello,


I am using the 4.8.2.0 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,
Raul

Hi,

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.

Hi,

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.

Hi

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 :

1;"test
test2
test3"

Aspose will return the value :

est
est2
est3

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 ?

Thanks

Hi,

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
avier
aut de ligne

instead of :
Default value from field
xavier
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.

Hi,

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;
}

Hi,

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 ?

Thanks

Hi,

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.