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

Free Support Forum - aspose.com

Export with Aspose.Cells creates wrong number of columns (usage of Cells.ImportData)

Hi Aspose team,

in attached project I am trying to export 2 CSV files using newly introduced ImportData functionality. Problem is that first export file is properly created (16 columns) and second file is created also with only first 16 columns and not 31 like I want.

If I use ImportDataTable (unfortunately you are planning to retire it) everything works ok.

Can you please check?


ImportData.zip (57.6 KB)


Thanks for the sample project with details.

After an initial test, I am able to reproduce the issue as you mentioned by using your sample project. I found Cells.ImportData imports wrong (less) number of columns from datatable. I confirmed by exporting 2 CSV files using newer ImportData method. In first export, file is properly created (16 columns) and second file is created with only first 16 columns, it should have 31 columns. When we use ImportDataTable method, it works fine though. I have logged a ticket with an id “CELLSNET-46622” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.


Please change code as following:

opt = New ImportTableOptions()
If chkImportDataTable.Checked Then
sheetSP.Cells.ImportDataTable(dataTableSP, True, "A1")
sheetSP.Cells.ImportData(dataTableSP, 0, 0, opt)
End If

Let us know your feedback.


Please try our latest version/fix: Aspose.Cells for .NET v19.2.5 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells19.2.5 For .Net2_AuthenticodeSigned.Zip (4.8 MB)
Aspose.Cells19.2.5 For .Net4.0.Zip (4.8 MB)


just to confirm that workaround worked and also that 19.2.5 resolved the problem.



Good to know that your issue is sorted out. 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.

The issues you have found earlier (filed as CELLSNET-46622) have been fixed in Aspose.Cells for .NET v19.3. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi