复制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 工作表

1.安装一个 Excel 库来复制工作表

  1. 打开 Excel 工作簿并创建一个新工作表。
  2. Use the CopyTo method to copy data to the new worksheet.
  3. 保存新的 Excel 工作表。

探索如何使用 IronXL 通过 C# 复制 Excel 单元格。

准备开始了吗?
Nuget 下载 1,765,830 | 版本: 2025.12 刚刚发布