Setting styles in Openpyxl
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need advice on setting styles in Openpyxl. I see that the NumberFormat of a cell can be set, but I also require setting of font colors and attributes (bold etc). There is a style.py class but it seems I can't set the style attribute of a cell, and I don't really want to start tinkering with the openpyxl source code. Has anyone found a solution to this? 回答1: As of openpyxl version 1.5.7, I have successfully applied the following worksheet style options... from openpyxl.reader.excel import load_workbook from openpyxl.workbook import Workbook