idea555

python xlwt 设置表格的行高方法

2021-04-02 12:34  idea555  阅读(1168)  评论(0编辑  收藏  举报

我们在用xlrd xlwt操作excel表格的时候希望能设计出好看的表格,列宽的话较为简单:

sheet3.col(1).width = 256*72   #设置列宽,256为基准数,

行高的话用如下方法设计:

      sheet3.row(count).height_mismatch = True
      sheet3.row(count).height = 20*40  #20为基准数,40意为40磅

找了很多地方才找到这么设置行高的。。。
————————————————
版权声明:本文为CSDN博主「david-foreststoe」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lishilinforeststone/article/details/104814980

分类:

技术点:

相关文章:

  • 2021-11-15
  • 2021-10-18
  • 2021-12-22
  • 2021-11-17
  • 2021-11-15
  • 2021-07-28
  • 2021-10-19
猜你喜欢
  • 2021-09-17
  • 2021-04-16
  • 2021-09-17
  • 2021-11-15
  • 2021-05-19
  • 2021-12-29
相关资源
相似解决方案