title: python-win32com excel com model started generating errors
body: <p>Over the last few days, I have been working on automating the generation of some pivot tables for a number of reports.</p>
  
  <p>Boiled down to the minimum, the following code was working without issue:</p>
  
  <pre><code>import win32com.client    
  objExcelApp = win32com.client.gencache.EnsureDispatch('Excel.Application')
  objExcelApp.Visible = 1
  </code></pre>
  
  <p>This would pop-up an instance of excel and I could continue working in Python. But suddenly, today my scripts are failing with the following:</p>
  
  <pre><code>&gt;&gt;&gt;import win32com.client
  &gt;&gt;&gt; objExcelApp = win32com.client.gencache.EnsureDispatch('Excel.Application')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Program Files (x86)\Python37-32\lib\site-packages\win32com\client\gencache.py", line 534, in EnsureDispatch
      mod = EnsureModule(tla[0], tla[1], tla[3], tla[4], bForDemand=bForDemand)
    File "C:\Program Files (x86)\Python37-32\lib\site-packages\win32com\client\gencache.py", line 391, in EnsureModule
      module = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
    File "C:\Program Files (x86)\Python37-32\lib\site-packages\win32com\client\gencache.py", line 266, in GetModuleForTypelib
      AddModuleToCache(typelibCLSID, lcid, major, minor)
    File "C:\Program Files (x86)\Python37-32\lib\site-packages\win32com\client\gencache.py", line 552, in AddModuleToCache
      dict = mod.CLSIDToClassMap
  AttributeError: module 'win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9' has no attribute 'CLSIDToClassMap'
  </code></pre>
  
  <p>The code has not changed from yesterday to today. I have no idea what is happening!!!.</p>
  
  <p>Another interesting kicker. if I do the same code in the same session again I get a different error:</p>
  
  <pre><code>&gt;&gt;&gt; objExcelApp = win32com.client.gencache.EnsureDispatch('Excel.Application')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Program Files (x86)\Python37-32\lib\site-packages\win32com\client\gencache.py", line 534, in EnsureDispatch
      mod = EnsureModule(tla[0], tla[1], tla[3], tla[4], bForDemand=bForDemand)
    File "C:\Program Files (x86)\Python37-32\lib\site-packages\win32com\client\gencache.py", line 447, in EnsureModule
      if module.MinorVersion != tlbAttributes[4] or genpy.makepy_version != module.makepy_version:
  AttributeError: module 'win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9' has no attribute 'MinorVersion'
  &gt;&gt;&gt;
  </code></pre>
  
  <p>So I jump over to a windows machine with a fresh windows install, install python37 and pip install pypiwin32. Run the very same lines and excel opens just like it did yesterday on my original machine.</p>
  
  <p>I tried un-installing and re-installing with no luck. Any idea what is going on here?</p>
  
  <p>NOTE:
  Dynamic dispatch still works:</p>
  
  <pre><code>import win32com.client
  objExcelApp = win32com.client.Dispatch("Excel.Application")
  objExcelApp.Visible = 1
  </code></pre>
  
  <p>But I specifically need static dispatch as Pivot Tables won't work with a dynamically dispatched object (much later in my code):</p>
  
  <pre><code>objExcelPivotCache = objExcelWorkbook.PivotCaches().Create(SourceType=win32c.xlDatabase, SourceData=objExcelPivotSourceRange)
  </code></pre>