ワークシートの削除
Contents
[
Hide
]
このトピックでは、Aspose.Cells.GridDesktopコントロールを使用したワークシートの削除について説明します。この基本的なタスクを達成するためのいくつかのシンプルなアプローチがあります。
ワークシートの削除
Aspose.Cells.GridDesktopコントロールを使用してワークシートを削除するには、以下の手順に従ってください:
- Aspose.Cells.GridDesktopコントロールをフォームに追加します。
- GridDesktopコントロールのワークシートコレクションのRemoveメソッドを呼び出します。
ワークシートのインデックスを使用する
この方法では、グリッドのワークシートコレクション内のワークシートのインデックスを単に渡します。
This file contains 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 | |
// Removing a worksheet using its index | |
gridDesktop1.Worksheets.Remove(0); |
ワークシートの名前を使用する
ワークシートの名前がわかっている場合、その名前を指定して特定のワークシートを削除することができます。
This file contains 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 | |
// Removing a worksheet using its index | |
gridDesktop1.Worksheets.RemoveAt("Sheet3"); |
削除はメソッドです。ワークシートのインデックス(ワークシートコレクション内)を使用してワークシートを削除するにはこれを使用するか、インデックス/名前を使用してワークシートを削除するには RemoveAt メソッドを使用します。