PatternFill to color results in black dot pattern
Created originally on Bitbucket by Bouni
I try to set the background color of a cell in an existing xlsx file, if I use the following code the result is a black and white dot pattern and not a full color background (See attachment):
wb = load_workbook(sys.argv[1])
ws = wb.active
ws['A1'].fill = PatternFill(fgColor=Color('FFEE1111'), fill_type = "solid")
wb.save(f"fill.xlsx")
If I open the original xlsx with my Excel 2010 and just hit save and run my openpyxl script again, the cell gets the right color. I guess its a problem with my original file but I don't know where to search for an error in there. Also the original file has 11kb and when I hit save, it goes up to 17kb.
Any ideas what can cause theis problem?
Attachments: pattern-bw