ワークシートのコピー
Contents
[
Hide
]
ワークシートの追加では、Aspose.Cells.GridWebに新しいワークシートを追加する方法について説明しています。また、Aspose.Cells.GridWebに別のワークシートのコピー(またはレプリカ)を追加することも可能です。同様のデータが別のワークシートにも必要な場合、既存のワークシートをコピーして新しいワークシートとしてAspose.Cells.GridWebに追加する方が簡単です。
ワークシートのコピー
Sheetのインデックスを使用して
以下のサンプルコードは、GridWebコントロールにワークシートのインデックスを指定してワークシートのコピーを追加する方法を示しています。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Adding the copy of a worksheet to GridWeb by specifying its sheet index | |
int sheetIndex = GridWeb1.WorkSheets.AddCopy(0); |
シート名を使用する
以下のサンプルコードは、GridWorksheetCollectionのAddCopyメソッドでワークシートの名前を指定して、そのワークシートのコピーをGridWebコントロールに追加する方法を示しています。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Adding the copy of a worksheet to GridWeb by specifying its sheet name | |
int sheetIndex1 = GridWeb1.WorkSheets.AddCopy("Students"); |
AddCopyメソッドは、新しく追加されたワークシートのインデックスを返し、そのインデックスを使用してワークシートインスタンスにアクセスすることができます。ワークシートへのアクセス方法の詳細については、ワークシートへのアクセスを参照してください。