Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Aug 07, 2014 11:20 am

Hi Folks,

At the moment I am evaluating the Spire.Xsl library (using the trial version). I was very happy with the merging process (I managed to merge two excel files each with 350k rows into one without getting out of memory exception). Right now I am trying to simply export a dataTable with 350k rows into a new excel file. However when I try to save it I end up only with 65k rows. Any ideas why?

I am using the following code:
Code: Select all
Workbook book = new Workbook();
Worksheet sheet = book.Worksheets[0];
sheet.InsertDataTable(dataTable, true, 1, 1);
book.SaveToFile("insertTableToExcel.xlsx", ExcelVersion.Version2013);

Andreaz
 
Posts: 1
Joined: Thu Aug 07, 2014 11:04 am

Fri Aug 08, 2014 3:10 am

Dear Andreaz,

Thanks for your inquiry.
When initialize an instance of Workbook,the property of Version is set to Version97to2003 by default.You can
set it to Version2010 manually.

For your requirement,please refer to the following code:
Code: Select all
Workbook book = new Workbook();
//add this
book.Version = ExcelVersion.Version2010;
Worksheet sheet = book.Worksheets[0];
sheet.InsertDataTable(dataTable, true, 1, 1);
book.SaveToFile("insertTableToExcel.xlsx", ExcelVersion.Version2013);

Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Tue Aug 12, 2014 5:11 am

Dear Samuel,

Have your problem been resolved?
If not, please provide us more information about your problem.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.XLS