Excel 写,边框颜色
Excel write, borders colour
我有风格:
style = xlwt.easyxf('font: bold off, color black; borders: left thin, right thin, top thin, bottom thin; pattern: pattern solid, fore_color white;')
但我想要其他颜色的边框,而不是黑色。但是颜色不是边框的已知属性。有没有可能做到这一点?
我认为你需要的是(例如红色边框):
style = xlwt.easyxf('font: bold off, color black;\
borders: top_color red, bottom_color red, right_color red, left_color red,\
left thin, right thin, top thin, bottom thin;\
pattern: pattern solid, fore_color white;')
在此处查看所有可用的样式选项:
http://pydoc.net/Python/xlwt/0.7.2/xlwt.Style/
我有风格:
style = xlwt.easyxf('font: bold off, color black; borders: left thin, right thin, top thin, bottom thin; pattern: pattern solid, fore_color white;')
但我想要其他颜色的边框,而不是黑色。但是颜色不是边框的已知属性。有没有可能做到这一点?
我认为你需要的是(例如红色边框):
style = xlwt.easyxf('font: bold off, color black;\
borders: top_color red, bottom_color red, right_color red, left_color red,\
left thin, right thin, top thin, bottom thin;\
pattern: pattern solid, fore_color white;')
在此处查看所有可用的样式选项: http://pydoc.net/Python/xlwt/0.7.2/xlwt.Style/