title: How to manipulate excel files xlsm using python 3
body: <p>good afternoon.</p>
  
  <p>I have a problem with my work and I can not solve it.</p>
  
  <p><strong>First problem:</strong> I need to read some values ​​in an xls file and place them in specific locations in an xlsm file daily.</p>
  
  <ul>
  <li>I can read the values, however I can not write to the xlsm file. Gives an error</li>
  </ul>
  
  <p><strong>Second problem:</strong> If I change xlsm to xls I can not just put the values ​​I need, it makes a copy of all information that has no original file.</p>
  
  <p>I am using xlrd as xlwt libraries</p>
  
  <pre><code>from xlrd import open_workbook
  from xlwt import easyxf
  from xlutils.copy import copy
  
  rb = open_workbook('Y:/Operação/RDH/2017/01 Jan/RDH05JAN.xlsx')
  sh = rb.sheet_by_index(0)
  sh2 = rb.sheet_by_index(1)
  sh3 = rb.sheet_by_index(2)
  sh4 = rb.sheet_by_index(3)
  
  wb = copy(rb)
  
  ws = wb.get_sheet(0)
  ws2 = wb.get_sheet(1)
  ws3 = wb.get_sheet(2)
  ws4 = wb.get_sheet(3)
  
  print ("SUDESTE")
  energia_armazenada_max_se = sh2.cell_value(rowx=6, colx=11)
  print ("Valor: " + str(energia_armazenada_max_se))
  ena_percent_mlt_se = format(sh2.cell_value(rowx=7, colx=7))
  print ("Valor: " + str(ena_percent_mlt_se))
  ena_total_mlt_se = format(sh2.cell_value(rowx=6, colx=7))
  
  ws.write ( 1,0, 999999 )
  ws.write ( 1, 1 , 999999 )
  
  wb.save('Y:\TEMP\Hugo\Programação\Balanço Diário de Energia 2017.xls')
  </code></pre>