📅  最后修改于: 2022-03-11 14:45:27.898000             🧑  作者: Mango
# 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")