C# – How to copy a single Excel worksheet from one workbook to another?

You could also use the Sheet.Copy() method.

Basically, Sheet.copy copies the sheet, and will automatically create a new workbook at the same time.

Try adding the following lines to your code, after your call to Worksheets.get_Item:

// Copies sheet and puts the copy into a new workbook
sheet.Copy(Type.Missing, Type.Missing);

// Sets the sheet variable to the copied sheet in the new workbook
sheet = app.Workbooks[2].Sheets[1];

Here’s the reference for the Copy() function as well:
MSDN Link

Leave a Comment