GridDesktop での Cells のマージとマージ解除
Contents
[
Hide
]
このトピックでは、ワークシートのセルを結合および結合解除するユーティリティ機能について説明します。この機能は、データの読みやすさを向上させるために、いくつかの行または列にまたがる必要がある場合に役立ちます。
合併 Cells
セルを 1 つの大きなセルに結合するには、次の手順に従ってください。
- 任意のアクセスワークシート
- 作成するCellsの範囲合併する
- マージセルの範囲を大きなセルに
使用できますマージ方法ワークシートセルを結合します。ただし、セルの範囲は次を使用して定義できます。セル範囲物体。
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 | |
// Accessing the worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Creating a CellRange object starting from "B4" to "C6" | |
CellRange range = new CellRange("B4", "C6"); | |
// Merging a range of cells | |
sheet.Merge(range); |
アンマージ Cells
大きなセルを多くのセルに結合解除するには、次の手順に従ってください。
- 任意のアクセスワークシート
- 結合を解除する必要がある結合セルにアクセスする
- マージ解除結合されたセルの位置を使用して、大きなセルを多くのセルに
使用できますマージ解除方法ワークシートその場所を使用してセルの結合を解除します。
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 | |
// Accessing the worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Accessing the merged cell that is currently in focus | |
GridCell cell = sheet.GetFocusedCell(); | |
// Unmerging a cell using its location | |
sheet.Unmerge(cell.Location); |
セルを 1 つのセルに結合すると、左上のセル (セルの範囲内) の書式設定が結合されたセルに適用されますが、セルが結合解除されると、結合されていないすべてのセルの書式設定が維持されます。