title: convert dataframe to excel and download
body: <p>I have created a flask application where it take excel file and it cleans the data and gives the output in excel file. basically what happens is user uploads the excel file after submitting browser should download the filtered excel file. 
  can someone suggest me references? I need to know how to set the path. I tried converting it into the HTML by using but this code doesn't download but it automatically saves the cleaned file as HTML.</p>
  
  <pre><code>    data1 = df.to_html()
      #write html to file 
      text_file = open("data1.html", "w") 
      text_file.write(data1) 
      text_file.close()
      return render_template("success.html", name = text_file)  
  </code></pre>