I am having an issue where worksheets in a workbook are being grouped by default. Here is some sample code:
//Open a Workbook.
Workbook yearly = new Workbook();
yearly.Open(@"C:\Aspose\A.xls");
//Open another Workbook.
Workbook monthly = new Workbook();
monthly.Open(@"C:\Aspose\B.xls");
//Open another Workbook merge the two.
Workbook main = new Workbook();
//Merging
main.Worksheets.Add("Data from A");
main.Worksheets[1].Copy(yearly.Worksheets[0]);
main.Worksheets.Add("Data from B");
main.Worksheets[2].Copy(monthly.Worksheets[0]);
//Save the file.
main.Worksheets.ActiveSheetIndex = 0;
main.Save(@"C:\Aspose\C.xls", FileFormatType.Default);
I've attached the related spreadsheets. If you run the above code, the resulting spreadsheet will show the worksheets as being highlighted and grouped. The user must right click one and select 'Ungroup' or click on any other worksheet to break the grouping.