ワークシートの名前を変更する
Contents
[
Hide
]
このトピックでは、Aspose.Cells.GridDesktop を使用してワークシートの名前を変更する方法について説明します。
例
ワークシートの名前変更は、非常に便利な簡単な作業です。たとえば、ワークシートにラベルを付けて、それぞれの内容が明確になるようにします。たとえば、経費情報を保持するために、モデルに月ごとに名前が付けられた 12 のワークシートがあるとします。
Aspose.Cells.GridDesktop コントロールを使用してワークシートの名前を変更するには:
- Aspose.Cells.GridDesktop コントロールをフォームに追加します。
- 目的のワークシートの参照を取得します。
- 参照を使用してワークシートの名前を設定します。
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 | |
// Accesing an active worksheet directly | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Renaming a worksheet | |
sheet.Name = "Renamed Sheet"; |
ワークシートの名前を変更する前に、そのワークシートの参照にアクセスする必要があります。ワークシート参照にアクセスするには、さまざまな方法があります。これらの方法については、次を参照してください。ワークシートへのアクセス.