title: How to read, edit, and save as another excel file in Python?
body: <p>I have an excel file that contains multiple sheets (sheet1, sheet2, sheet3, sheet4, etc). I would like to make some formatting changes using python and save those edited files as a separate excel file with multiple sheets.</p>
  <p><strong>Step 1:</strong> Read the file containing multiple sheets</p>
  <p><strong>Step 2:</strong> Make changes in the sheets</p>
  <p><strong>Step 3</strong>: Save the changes to an excel file containing multiple sheets</p>
  <p>What I tried so far?</p>
  <pre><code>import pandas as pd
  import pandas.io.formats.style
  import os
  from pandas import ExcelWriter
  import numpy as np
  import xlsxwriter
  from itertools import cycle
  
  from xlsxwriter.utility import xl_rowcol_to_cell
  
  df = pd.ExcelFile('data.xlsx')
  
  for i in df.sheet_names:
      # make the required changes
      writer = pd.ExcelWriter('edited_file.xlsx', engine='xlsxwriter', options={'strings_to_numbers': True}, date_format='mmmm dd yyyy')  
      df.to_excel(writer, sheet_name= i , startrow=1 , startcol=0, header=False, index=False, encoding='utf8')  
      workbook  = writer.book
      worksheet = writer.sheets[i]
  
      data_format1 = workbook.add_format({'bg_color': '#F1EEEE'})
      data_format2 = workbook.add_format({'bg_color': '#FFFFFF'})
  
      formats = cycle([data_format1, data_format2])
  
      for row, value in enumerate(df):
          data_format = next(formats)
          worksheet.set_row(row, cell_format=data_format)
          worksheet.write(row, 0, value)
  
      format_header = workbook.add_format()
      format_header.set_bold()
      format_header.set_border()
      format_header.set_bg_color('gray')
      format_header.set_font_color('white')
  
      format_data = workbook.add_format()
  
      #worksheet.set_column('A:Z', 20, format_data)
      worksheet.set_row(0, 20, format_header)
  
      # Write the header manually
      for colx, value in enumerate(df.columns.values):
          worksheet.write(0, colx, value)
  
      worksheet.autofilter(0, 0, df.shape[0], df.shape[1])
  
      writer.save()
  
  </code></pre>
  <p>I am unable to save multiple sheets, only the first sheet is saved. How do I do that?</p>