Free Support Forum - aspose.com

Merge excel files usign Aspose.Cells 4.8.1.0

Hi,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We are using “Aspose.Cells 4.8.1.0” to generate excel reports.

I am Exporting data to Excel and Aspose.Cells generated Excel (.xls) file size is 817 MB.

In that Excel

5 worksheets

63000 rows in each sheet

250 cells in each sheet

I have 4 other excels generated by aspoce.Cells ,sizes are 640 MB,389 MB,298 MB and 207 MB.

I need to Merge all these 5 Excels into one excel file with no of worksheets.

I used the code

Excel objMainExcel = new Excel();

Excel objStateExcel = new Excel(strExcelFile, objClientConfiguration);

if (objStateExcel.Excel.Worksheets.Count > 0)

{

for (int intWorksheet = 0; intWorksheet < objStateExcel.Excel.Worksheets.Count; intWorksheet++)

{

Aspose.Cells.Worksheet objWorkSheet = objMainExcel.Excel.Worksheets.Add(objStateExcel.Excel.Worksheets[intWorksheet].Name);

objWorkSheet.Copy(objStateExcel.Excel.Worksheets[intWorksheet]);

}

}

Is there any other way to merge excel files usign Aspose.Cells? Please help me to solve this problem.

For small file (300 MB) ,its fine.

But its taking too much time and not merging for large file(817 MB)(running 2 to 3 days but not completing).

Regards,

Gopi.


This message was posted using Email2Forum by nausherwan.aslam.

Hi Gopi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Well, the size of your template files is very large and it will definitely take a lot of time and memory to combine / merge these files. Do you get any error / exception while merging these files? Please try the attached latest version of Aspose.Cells as we have made some enhancements regarding performance. Also, you may try Workbook.Combine method to combine different workbooks. Please see the following documentation link in this regard:

http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/combine-multiple-workbooks-into-a-single-workbook.html

Thank You & Best Regards,

Hi,

I think Nausherwan has missed to attach latest version/fix for you.

I have attached the latest version/fix here for your requirement.

Thank you.