最新的 openpyxl 2.0.5 版本官方doc中有关于cell style的一些案例(https://pythonhosted.org/openpyxl/styles.html),
但是自己亲测Color类导入出错,使用旧版本1.5.7设置成功
(http://stackoverflow.com/questions/8440284/setting-styles-in-openpyxl)。
在找寻错误原因是发现2.0.0的发布日志里说明了一些style有更改,随即我就换用了旧版本先将问题解决。
在python 中有dir()命令可以查询包中含有的模块,或者模块中含有的类。包中的__doc__提供另外一种查看模块的方法