title: Python Pandas: Copy CSV to Excel without overwriting
body: <p>There is one CSV file with many rows and columns of data that needs to be copied into <code>sheet1</code> starting at row 11 of a &quot;master&quot; Excel .xlsx file.</p>
  <p>There are graphs and formatting in the &quot;master&quot; excel file that need to be preserved.  The problem that I'm having is that the &quot;master&quot; Excel file, <code>python_out.xlsx</code>, is overwritten with my code and the graphs and formatting are wiped out.</p>
  <p>I've found a couple of helps like <a href="https://stackoverflow.com/questions/39805677/write-values-to-a-particular-cell-in-a-sheet-in-pandas-in-python">Write values to a particular cell in a sheet in pandas in python</a> but they are only writing a few cells worth of data and not copying over an entire .csv file.</p>
  <pre><code>import os
  import pandas as pd
  from openpyxl import load_workbook
      
      
  read_file = pd.read_csv(r'C:\4336Gen5 size\Noise\mode0\mode_0_40c_noise.csv')
      
  read_file.to_excel(r'C:\4336Gen5 size\Noise\mode0\python_out.xlsx', startcol=0, startrow = 10, index = None, header = True)
  </code></pre>