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.

このリンクからファイルプロジェクトをダウンロードできます。

ExcelワークシートをC#でコピーする方法

  1. Excelライブラリをインストールしてワークシートをコピーします
  2. Excelワークブックを読み込み、新しいシートを作成します。
  3. Use the CopyTo method to copy data to the new worksheet.
  4. 新しいExcelワークシートを保存します。

IronXL で C# を使用して Excel セルをコピーする方法を学びます。

準備はできましたか?
Nuget ダウンロード 1,802,965 | バージョン: 2025.12 リリース