Copy sheet from external Workbook to active Workbook

Topics: Developer Forum, User Forum
Jun 17, 2008 at 7:09 AM
How can I copy Worksheet from external Workbook to active Workbook?

Excel.Workbook workbook = Globals.ThisWorkbook.Application.Workbooks.Open(@"C:\MyWorkbook.xls", missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);

Excel.Worksheet worksheet = workbook.Sheets[1] as Excel.Worksheet;

worksheet.Copy(missing, Globals.Sheet3.InnerObject);


Coordinator
Jun 19, 2008 at 6:32 PM
Will be implemented as a new feature. http://www.codeplex.com/PHPExcel/WorkItem/View.aspx?WorkItemId=6391