IRONSOFTWAREHOME
Copy Excel Worksheets
using IronXL;

WorkBook firstBook = WorkBook.Load("sample.xlsx");
WorkBook secondBook = WorkBook.Create();

// Select first worksheet in the workbook
WorkSheet workSheet = firstBook.DefaultWorkSheet;

// Duplicate the worksheet to the same workbook
workSheet.CopySheet("Copied Sheet");

// Duplicate the worksheet to another workbook with the specified name
workSheet.CopyTo(secondBook, "Copied Sheet");

firstBook.Save();
secondBook.SaveAs("copyExcelWorksheet.xlsx");
Imports IronXL

Dim firstBook As WorkBook = WorkBook.Load("sample.xlsx")
Dim secondBook As WorkBook = WorkBook.Create()

' Select first worksheet in the workbook
Dim workSheet As WorkSheet = firstBook.DefaultWorkSheet

' Duplicate the worksheet to the same workbook
workSheet.CopySheet("Copied Sheet")

' Duplicate the worksheet to another workbook with the specified name
workSheet.CopyTo(secondBook, "Copied Sheet")

firstBook.Save()
secondBook.SaveAs("copyExcelWorksheet.xlsx")
NuGet Download
PM > Install-Package IronXL.Excel
Copy Excel Worksheets

Copy Excel Worksheets

The code example above shows how to use IronXL to duplicate and copy WorkSheets within and between Excel WorkBooks. Copy and paste sheets to and from other workbooks. Create duplicate sheets within the same workbook.

The CopySheet method is used to duplicate a worksheet within the same workbook or spreadsheet. The name of the new worksheet is required as a parameter.

Use the CopyTo method to duplicate a sheet to or from another workbook. A WorkBook is required as the first parameter and is followed by the name of the new worksheet.

You can download a file project from this link.

How to Copy Excel Worksheets in C#

  1. Install an Excel library to copy worksheets.
  2. Load an Excel workbook and create a new sheet.
  3. Use the CopyTo method to copy data to the new worksheet.
  4. Save the new Excel worksheet.
Explore how to copy Excel cells using C# with IronXL.
View on GitHub

Ready to Get Started?

Nuget Downloads 2,237,574Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required