luckiness
from  docx  import  Document
from  docx.shared  import Cm
w=Document(r\'  \')
w.tables[0].add_row()             #给表格增加一行
w.tables[0].add_column(Cm(5))     #给表哥增加一列

print(len(w.tables[0].rows))      #查询表格中的行数
print(len(w.tables[0].columns))    #查询表格中的列数

row=w.tables[0].rows[1]       #定位表格的行
col=w.tables[0].columns[1]    #定位表格的列

 

分类:

技术点:

相关文章:

  • 2021-11-11
  • 2021-12-02
  • 2021-11-30
  • 2021-10-19
  • 2021-10-26
  • 2021-11-05
  • 2021-10-13
猜你喜欢
  • 2021-11-11
  • 2021-11-11
  • 2021-10-16
  • 2021-11-11
  • 2021-07-12
  • 2021-11-27
  • 2021-11-30
相关资源
相似解决方案