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.

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

How to Copy Excel Worksheets in C

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

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

準備はできましたか?
Nuget ダウンロード 1,913,565 | バージョン: 2026.3 リリース
Still Scrolling Icon

まだスクロールしていますか?

すぐに証拠が欲しいですか? PM > Install-Package IronXL.Excel
サンプルを実行する あなたのデータがスプレッドシートになるのを見る。