Hi,
I am testing the Spire.XLS library and wanting to combine multiple XLS files into a new file.
I have tried the following code:
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"C:\TestFiles\test.xls", ExcelVersion.Version97to2003);
Workbook workbook2 = new Workbook();
workbook.LoadFromFile(@"C:\TestFiles\add.xls", ExcelVersion.Version97to2003);
workbook.Worksheets.AddCopy(workbook2.Worksheets);
workbook.SaveToFile(@"C:\TestFiles\Combined.xls", ExcelVersion.Version97to2003);
All I end up is the original file and 3 blank worksheets.
Can you give me some pointers as to the best method of combining the files?
Cheers,
Mark.