AttributeError - Cannot import Color.RED
Created originally on Bitbucket by supermitch (Mitch LeBlanc)
According to the docs, this should work:
from openpyxl.workbook import Workbook
from openpyxl.styles import Style, Color, Font
wb = Workbook()
ws = wb.active
ws['A1'] = 'This is red'
ws['A1'].style = Style(font=Font(color=Color(Color.RED)))
However, Color.RED causes an error:
AttributeError: Type object 'Color' has no attribute 'RED'
I can set the index manually, e.g. '00FF0000'
and it works, but I think your init.py import of Color class is messing with the module constants somehow?
I'm on Python 3.4.0 on win32, with the very newest 2.0.3 openpyxl.