title: Python - Fill a table MSSQL with data from Excel
body: <p>I have an xlsx file with 4 column and 68k+ lines. And i want to put all data in a table in MSSQL server. I made this.</p>
  
  <pre><code>def jb_treat_attributes(dicoval):
  conn = pymssql.connect(dicoval['MSSQL_erver'],dicoval['MSSQL_Login'],dicoval['MSSQL_Password'],dicoval['MSSQL_Database_DELTA'])
      cursor = conn.cursor()
      cursor.execute('TRUNCATE TABLE delta.Attribute')
      for row in load_workbook(dicoval['path_root']+'Delta/attributes/excel.xlsx').worksheets[0].iter_rows():
          row = [cell.value.strip() if cell.value is not None else '' for cell in row]
          cursor.execute("INSERT INTO delta.Attribute VALUES (%s,%s,%s,%s)",(row[0],row[1],row[2],row[3]))
      conn.commit()
      conn.close()
  </code></pre>
  
  <p>And it's working, but with 340s of execution time. Does it exist a way to do it faster ?</p>