Write a pandas df into Excel and save it into a copy
<p>I have a pandas dataframe and I want to open an existing excel workbook containing formulas, copying the dataframe in a specific set of columns (lets say from column A to column H) and save it as a new file with a different name.</p>

<p>The idea is to update an existing template, populate it with the dataframe in a specified set of column and then save a copy of the Excel file with a different name.</p>

<p>Any idea?</p>

<p>What I have is:</p>

<pre><code>  import pandas
  from openpyxl import load_workbook

 book = load_workbook('Template.xlsx')
 writer = pandas.ExcelWriter('Template.xlsx', engine='openpyxl') 
 writer.book = book
 writer.sheets = dict((ws.title, ws) for ws in book.worksheets)

 df.to_excel(writer)

 writer.save()
</code></pre>