ペインのフリーズとフリーズ解除
Contents
[
Hide
]
このトピックでは、行と列を固定および固定解除する方法について説明します。列または行を固定すると、ユーザーはワークシートの他の部分にスクロールしている間、列見出しまたは行タイトルを表示したままにすることができます。この機能は、大量のデータを含むワークシートを操作する場合に非常に役立ちます。ユーザーがスクロールすると、データのみが下にスクロールされ、見出しがそのまま残るため、日付が読みやすくなります。フリーズ ペイン機能は、Internet Explorer 6.0 以降でのみサポートされています。
行と列の固定
特定の数の行と列を固定するには:
- Aspose.Cells.GridWeb コントロールを Web フォームに追加します。
- ワークシートにアクセスします。
- 行と列の数を固定します。
インターフェイスを使用して、特定の数の行と列を固定することもできます。行と列を固定するセルを右クリックして選択します氷結リストから。
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 | |
// Get user inputs for row, column, number of rows and number of columns | |
int row = Convert.ToInt16(txtRow.Text.Trim()); | |
int column = Convert.ToInt16(txtColumn.Text.Trim()); | |
int noOfRows = Convert.ToInt16(txtNoOfRows.Text.Trim()); | |
int noOfColumns = Convert.ToInt16(txtNoOfColumns.Text.Trim()); | |
// Accessing the reference of the worksheet that is currently active | |
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex]; | |
// Freeze desired rows and columns | |
sheet.FreezePanes(row, column, noOfRows, noOfColumns); |
行と列の解凍
行と列を固定解除するには:
- Aspose.Cells.GridWeb コントロールを Web フォームに追加します。
- ワークシートにアクセスします。
- 行と列の固定を解除します。
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 | |
// Accessing the reference of the worksheet that is currently active | |
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex]; | |
// Unfreezing rows and columns | |
sheet.UnFreezePanes(); |