title: Python CSV to Excel sheet by sheet with openpyxl [NOT OPTIMIZED]
body: <p>I actually have a program who read a csv and insert it in a xlsx sheet, but actually this program take too much time to execute and i don't know how i can't optimize it, if you have some tips help me please.</p>
  <pre><code>    df = pd.read_csv( file, sep=';', decimal='.', encoding=&quot;utf-8&quot;, index_col=False )
      df.to_excel( 'tmp.xlsx', sheet_name=action, index=None, header=True )
  
      book = openpyxl.load_workbook( template_file )
      writer = pd.ExcelWriter( template_file, engine='openpyxl' )
      writer.book = book
      writer.sheets = dict( ( ws.title, ws ) for ws in book.worksheets )
      df.to_excel( writer, action, index=None )
      writer.save()
      os.remove( 'tmp.xlsx' )```
  </code></pre>