//An example of copying worksheets between workbooks
ExcelApplication xla = new ExcelApplication();
Workbook wbSource = xla.Open("sourceWorkbook");
Workbook wbDest = xla.Open("destWorkbook");
//Copy a worksheet from the source workbook into the destination workbook
//Insert the copy at the beginning of the workbook
Worksheet wsToCopy = wbSource.Worksheets([0)];
wbDest.Worksheets.CopySheet(wsToCopy, 0, wsToCopy.Name);
|