title: How to use python to open existing .xlsx paste dataframe to a specified spreadsheet and location without wiping other tabs and values?
body: <p>I want to copy a dataframe from a .csv file and paste it into an existing .xls file in a specified sheet and a specified location.</p>
  
  <p>This code writes the dataframe to the existing excel file, but it overwrites the file completely. The workbook consists of other tabs too.
  the outcome was, it copied and pasted to the specified location,
  but other tabs and cell values got wiped out too.</p>
  
  <pre><code>import os
  import pandas as pd
  import datetime
  import csv
  import xlsxwriter
  
  from openpyxl import Workbook
  from openpyxl import load_workbook
  from openpyxl.chart import LineChart,Reference 
  
  from win32com.client import Dispatch
  import os
  
  from pandas import ExcelWriter
  
  xl = Dispatch("Excel.Application")
  xl.Visible = True
  
  #record start time
  currentDT_start =datetime.datetime.now()
  
  # Read index data from .csv
  index_file=r"file\name\.."
  analysis_file=r"file\name.."
  
  py_index_file=index_file.replace('\\','\\\\')
  py_analysis_file=analysis_file.replace('\\','\\\\')
  
  #copying 
  index = pd.read_csv(py_index_file,skiprows=1)
  #print(index.head())
  
  
  
  #this code write the dataframe to the existing excel file, but it overwrite the file completely. the workbook consists of other tabs too.
  # the outcome was it copied and pasted to specified location
  # but other tabs and cells values got wiped out too.
  
  writer=ExcelWriter(py_analysis_file)
  index.to_excel(writer,'Indexes',startrow=1)
  writer.save()
  
  
  currentDT_end=datetime.datetime.now()
  
  print('Code started on ' + currentDT_start.strftime("%Y-%m-%d %H:%M:%S") + ' !')
  print('Code completed on ' + currentDT_end.strftime("%Y-%m-%d %H:%M:%S") + ' !')
  </code></pre>