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#でコピーする方法
- Excelライブラリをインストールしてワークシートをコピーします。
- Excelワークブックを読み込み、新しいシートを作成します。
- Use the
CopyTomethod to copy data to the new worksheet. - 新しいExcelワークシートを保存します。





