Freeze Unfreeze Rows and Columns
Contents
[
Hide
]
This topic deals with the information about freezing and unfreezing rows and columns of a worksheet. Freezing columns or rows enables users to keep the column headings or row titles visible while they are scrolling to other parts of the worksheet. This feature is very helpful for scrolling through the worksheets that contain huge volumes of data. Because, in such cases, when users will scroll data then only data will be scrolled down and headings would stay there to increase the readability of data.
Freezing Columns
To freeze columns of a worksheet using Aspose.Cells.GridDesktop, please follow the steps below:
- Access any desired Worksheet
- Set the number of Frozen Columns in the Worskheet
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 worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Setting the number of frozen columns to 2 | |
sheet.FrozenCols = 2; |
Un-Freezing Columns
To unfreeze columns of a worksheet using Aspose.Cells.GridDesktop, please follow the steps below:
- Access any desired Worksheet
- Set the number of Frozen Columns in the Worskheet to Zero (0). It will produce the effect of unfrozen columns
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 worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Setting the number of frozen columns to 0 for unfreezing columns | |
sheet.FrozenCols = 0; |
Freezing Rows
To freeze rows of a worksheet using Aspose.Cells.GridDesktop, please follow the steps below:
- Access any desired Worksheet
- Set the number of Frozen Rows in the Worskheet
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 worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Setting the number of frozen rows to 2 | |
sheet.FrozenRows = 2; |
Un-Freezing Rows
To unfreeze rows of a worksheet using Aspose.Cells.GridDesktop, please follow the steps below:
- Access any desired Worksheet
- Set the number of Frozen Rows in the Worskheet to Zero (0). It will produce the effect of unfrozen rows
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 worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Setting the number of frozen rows to 0 for unfreezing rows | |
sheet.FrozenRows = 0; |