Заморозить и разморозить панели
Contents
[
Hide
]
В этом разделе объясняется, как закрепить и разморозить строки и столбцы. Закрепление столбцов или строк позволяет пользователям сохранять видимыми заголовки столбцов или строк при прокрутке к другим частям рабочего листа. Эта функция очень полезна при работе с листами, содержащими большие объемы данных. Когда пользователи прокручивают, только данные прокручиваются вниз, а заголовки остаются на месте, что упрощает чтение даты. Функция закрепления областей поддерживается только в Internet Explorer 6.0 или более поздней версии.
Замораживание строк и столбцов
Чтобы закрепить определенное количество строк и столбцов:
- Добавьте элемент управления Aspose.Cells.GridWeb в веб-форму.
- Доступ к рабочему листу.
- Заморозить несколько строк и столбцов.
Также можно заморозить определенное количество строк и столбцов с помощью интерфейса. Щелкните правой кнопкой мыши ячейку, в которой вы хотите закрепить строки и столбцы, и выберитеЗаморозить из списка.
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 в веб-форму.
- Доступ к рабочему листу.
- Разморозить строки и столбцы.
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(); |