问题描述
我正在将Julia 1.5.0与openpyxl一起使用,我想在Excel工作表中更改列宽。
这里描述了python的方式: Is it possible to change the column width using openpyxl?
但是在Julia中,当我使用openpyxl并尝试执行相同操作时,它不起作用,因为ws.column_dimensions是一个空字典
using Conda
Conda.add("openpyxl")
using PyCall
xl = pyimport("openpyxl")
# create a workbook
wb = xl.Workbook()
# select active worksheet
ws = wb.active
# try to change the width of the column A --> NOT working
ws.column_dimensions["A"].width = 25
如果我尝试使用更改第一行的高度,则会存在相同的问题
ws.row_dimensions[1].height = 30
有任何提示吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)