使用电子表格冻结第一行 [英] freeze top row using spreadsheetgear
本文介绍了使用电子表格冻结第一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用电子表格冻结第一行(并且仅冻结第一行)?
How can I freeze top row (and only the row) using spreadsheetgear?
当我尝试此操作时:
worksheet.WindowInfo.FreezePanes = true;
冻结第一行和第一列(A).我只需要冻结第一行即可.
It freezes both the top row and the first column (A). I only need it to freeze the top row.
推荐答案
经过研究,我发现我需要先选择单元格,然后设置FreezePanes属性:
After some research I found out I need to select the cell first and then set the FreezePanes property:
worksheet.Cells[1,0].Select();
worksheet.WindowInfo.FreezePanes = true;
基本上会发生什么,它会冻结所选单元格上方的行和左侧的列.
Basically what happens is it freezes rows above and columns to the left of the selected cell.
这篇关于使用电子表格冻结第一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文