简体   繁体   English

如何在python中使用xlsxwriter冻结excel文件中的行和列

[英]how to freeze a row and a columns in an excel file using xlsxwriter in python

I want to freeze the first row and the first column in my excel file using xlsxwriter in python, I tried the bellow code, and seems like that it freeze just the column, when I remove the second line on the code that freeze the column, it freezes the first row, seems like the second line in the code overwrite the first one. 我想在python中使用xlsxwriter冻结我的excel文件中的第一行和第一列,我尝试了下面的代码,看起来它只冻结了列,当我删除冻结列的代码的第二行时,它冻结了第一行,似乎代码中的第二行覆盖了第一行。

worksheet.freeze_panes(1, 0) # # Freeze the first row.
worksheet.freeze_panes(0, 1) # Freeze the first column.

I checked the documentation here , seems like no help there. 我在这里检查了文档,似乎没有帮助。
Thanks! 谢谢!

我找到了这个linne,它为我做了工作!

worksheet.freeze_panes(1, 1) # # Freeze the first row and column

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM