Hi,
I use 7.0.1.0 Aspose.Cells / .Net
I want to assemble multiple documents into same file.
I want to keep the style and formula for all the worksheets.
For that i use:
public static void MergeExcelDocuments(IList excelDocumentsIn, string fileOut)
{
Workbook mainWB = new Workbook(FileFormatType.Xlsx);
mainWB.Worksheets.Clear();
foreach (string docPath in excelDocumentsIn)
mainWB.Combine(new Workbook(docPath));
mainWB.Save(fileOut);
}
But I see that there are problems on the formulas in Tables 2007,
And the style Tables (2010 standard table style) change (see files attachments)
Thanks !
Hi,
Thanks for your posting and considering Aspose.Cells for .NET.
Please download and try the latest version:
Aspose.Cells
for .NET v7.1.0.5
and see if it works fine for you.
thank you for your response
But I reproduce problems with your Version 7.1.0.5 and my Version 7.0.1.0 !
(On Excel load error data for formula in Table, and style is not the same as the original)
Hi,
Well, I tested your case with v7.1.0.5 (as Shakeel Faiz provided the download link) using your provided files, it works fine. Here is my sample code and please find attached the output file.
Sample code:
List paths = new List { @“e:\test2\combined\test1.xlsx”, @“e:\test2\combined\test2.xlsx” };
Workbook workbook1 = null;
foreach (var excelPath in paths)
{
if (excelPath != null && File.Exists(excelPath))
{
if (workbook1 == null)
{
workbook1 = new Workbook(excelPath);
}
else
{
var opened = new Workbook(excelPath);
workbook1.Combine(opened);
}
}
}
workbook1.Save(@“e:\test2\combined\2myAsposeCombineCombined.xlsx”);
If you still have any issue, let us know with details, you may give us screen shots for the problematic areas in the output merged file, we will check it soon.
Thank you.
Amjad Sahi
Thanks ! Solved my problem
Works on 7.0.1.0 and current version !
Good to know that your problem is resolved.
Have a good day!