📌  相关文章
📜  引发 TypeError(&#39;expected&#39; + str(self.expected_type)) TypeError: 预期<class 'openpyxl.styles.colors.Color'>- Python 代码示例

📅  最后修改于: 2022-03-11 14:45:27.898000             🧑  作者: Mango

代码示例1
# It's strange but fgcolor and bgcolor didn't work in my case 
# but start_color, end_color seems to work well 

from openpyxl.styles import PatternFill
sheet['A1'].fill = PatternFill(start_color="FFC7CE", end_color="FFC7CE", fill_type = "solid")