複製 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 剛發表