在Python中使用xlwings,我已经能够添加单元格边框并设置它们的权重。但不幸的是,每次我尝试更改边框颜色时,代码就会卡住
import xlwings as xw
sheet = xw.sheets[0]
cells = sheet.range((2,2),(2,6))
cells.api.Borders(11).Weight = 3
cells.api.Borders(11).Color = '#ffffff' # This line gets the code stuck
知道是什么引起的吗
1条答案
按热度按时间7xllpg7q1#
您可以用途:
输出: