ワークシートの名前を変更する
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"; |
ワークシートの名前を変更する前に、そのワークシートの参照へのアクセスが必要です。ワークシートの参照にアクセスする方法はいくつかあります。それらの方法については、ワークシートへのアクセスを参照してください。