复制Excel工作表
The code example above shows how to use IronXL to duplicate and copy WorkSheets within and between Excel WorkBooks. 在其他工作簿中复制和粘贴工作表。 在同一工作簿中创建重复工作表。
The CopySheet method is used to duplicate a worksheet within the same workbook or spreadsheet. 新工作表的名称是必需的参数。
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.
你可以通过这个链接下载项目文件。
如何在 C# 中复制 Excel 工作表
- 打开 Excel 工作簿并创建一个新工作表。
- Use the
CopyTomethod to copy data to the new worksheet. - 保存新的 Excel 工作表。





