冻结解冻行和列
Contents
[
Hide
]
本主题涉及有关冻结和解冻工作表的行和列的信息。冻结列或行使用户能够在滚动到工作表的其他部分时保持列标题或行标题可见。此功能对于滚动浏览包含大量数据的工作表非常有帮助。因为在这种情况下,当用户滚动数据时,只有数据会向下滚动,而标题会保留在那里以增加数据的可读性。
冻结列
要使用 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 | |
// 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; |
解冻列
要使用 Aspose.Cells.GridDesktop 解冻工作表的列,请按照以下步骤操作:
- 访问任何想要的工作表
- 设置数量冻结列在里面工作表归零 (0)。会产生unfrozen columns的效果
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(); | |
// Setting the number of frozen columns to 0 for unfreezing columns | |
sheet.FrozenCols = 0; |
冻结行
要使用 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 | |
// 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; |
解冻行
要使用 Aspose.Cells.GridDesktop 解冻工作表的行,请按照以下步骤操作:
- 访问任何想要的工作表
- 设置数量冻结行在里面工作表归零 (0)。会产生解冻行的效果
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(); | |
// Setting the number of frozen rows to 0 for unfreezing rows | |
sheet.FrozenRows = 0; |