The code
import win32com.client as win32
Excel = win32.gencache.EnsureDispatch('Excel.Application')
used to work, but now it produces the error:
AttributeError: 'module' object has no attribute 'CLSIDToPackageMap'
what's going on?
After deleting C:\Temp\gen_py
, the code above works again. Hope it can save trouble!
PS. Or, you can try searching gen_py
in your %TEMP%
folder;