[英]python openpyxl insert_cols changes merge-cells and styles
I tried to insert a column into an excel. 我试图在Excel中插入一列。
However, the style of cells has been changed 但是,单元格的样式已更改
CODE: 码:
import openpyxl
wb = openpyxl.load_workbook('xt3.xlsx')
sheet = wb.worksheets[0]
sheet.insert_cols(0)
[enter image description here][1]wb.save("filename.xlsx")
https://i.stack.imgur.com/hl5QY.png https://i.stack.imgur.com/hl5QY.png
issues on bitbucket: https://bitbucket.org/openpyxl/openpyxl/issues/1098/bugs-insert_cols-changes-merge-cells-and 关于bitbucket的问题: https ://bitbucket.org/openpyxl/openpyxl/issues/1098/bugs-insert_cols-changes-merge-cells-and
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.