title: Python: Save dataframe to excel (win32.com)
body: <p>I have a code that downloads data from yahoo finance to df for list of stocks. Than I create new spreadsheet for each stock. But I cannot manage to copy data from df to this spreadsheet.</p>
  <pre><code>n=number_of_stocks
  m = 0
  while n &gt; 0:
      x = Input_Stock_Names[m]
      m+=1
      n-=1
      df = pdr.get_data_yahoo(x,starting_date,ending_date)
      df = df.reset_index()
      
      ExcelWrksht = ExcelWrkbook.Worksheets.Add()
      ExcelWrksht.Name = x
      ExcelWrksht = ExcelWrkbook.Worksheets(x)
  </code></pre>
  <p>Also excel file is open while code is running.</p>