title: win32com Excel data input error
body: <p>I'm exporting results of my script into Excel spreadsheet. Everything works fine, I put big sets of data into SpreadSheet, but sometimes an error occurs:</p>
  
  <pre><code>             File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 550, in __setattr__
                  self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value)
              pywintypes.com_error: (-2147352567, 'Exception.', (0, None, None, None, 0, -2146777998), None)***
  </code></pre>
  
  <p>I suppose It's not a problem of input data format. I put several different types of data strings, ints, floats, lists and it works fine. When I run the sript for the second time it works fine - no error. What's going on?</p>
  
  <p>PS. This is code that generates error, what's strange is that the error doesn't occur always. Say 30% of runs results in an error. :</p>
  
  <pre><code>import win32com.client
  def Generate_Excel_Report():    
      Excel=win32com.client.Dispatch("Excel.Application")
      Excel.Workbooks.Add(1)    
      Cells=Excel.ActiveWorkBook.ActiveSheet.Cells
      for i in range(100):
          Row=int(35+i)
          for j in range(10):                      
              Cells(int(Row),int(5+j)).Value="string"
      for i in range(100):
          Row=int(135+i)
          for j in range(10):
  
              Cells(int(Row),int(5+j)).Value=32.32 #float
  
  Generate_Excel_Report()
  </code></pre>
  
  <p>The strangest for me is that when I run the script with the same code, the same input many times, then sometimes an error occurs, sometimes not.</p>