我有一种风格:
style = xlwt.easyxf('font: bold off, color black; borders: left thin, right thin, top thin, bottom thin; pattern: pattern solid, fore_color white;')
但我希望有其他颜色的边框,而不是黑色。但颜色不是边界的已知属性。有没有可能做到这一点?
答案 0 :(得分:2)
我认为你需要的是(例如红色边框):
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/