Copiar planilhas do Excel

The code example above shows how to use IronXL to duplicate and copy WorkSheets within and between Excel WorkBooks. Copie e cole planilhas para e de outros livros. Crie planilhas duplicadas dentro do mesmo livro.

The CopySheet method is used to duplicate a worksheet within the same workbook or spreadsheet. O nome da nova planilha é necessário como parâmetro.

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.

Você pode baixar um projeto de arquivo deste link.

How to Copy Excel Worksheets in C

  1. Instale uma biblioteca Excel para copiar planilhas.
  2. Carregue um livro Excel e crie uma nova folha.
  3. Use the CopyTo method to copy data to the new worksheet.
  4. Salve a nova planilha Excel.

Explore como copiar células do Excel usando C# com IronXL.

Pronto para começar?
Nuget Downloads 1,913,565 | Versão: 2026.3 acaba de ser lançado
Still Scrolling Icon

Ainda está rolando a tela?

Quer provas rápidas? PM > Install-Package IronXL.Excel
executar um exemplo Veja seus dados se transformarem em uma planilha.