Python win32com excel remove interior color
Solution 1:
Use -4142
, which is the corresponding value for xlNone
:
xlNone = -4142
ws.Cells(r,c).Interior.Color = xlNone
Or instead of hard-coding, use EnsureDispatch()
and then client.constants.xlNone
:
from win32com import client
xl=client.gencache.EnsureDispatch('Excel.Application')
ws.Cells(r,c).Interior.Color = client.constants.xlNone