title: Opening a web page as an Excel file, but with .xlsx files
body: <p>Okay, this might be a bit unusual.  If there are better ways to do this (that are just as easy, I'm open to ideas).  I found a while ago that I could open a web page consisting of a Gridview or a table, with titles, etc. as an excel file and it worked great!  It formatted the Excel file with colors and alignment similar to the html from the page.  With later versions of excel, though, it gives me a warning that the format time isn't valid before opening it, though it still seemed to work.  So I tried changing the content type to a more current version of excel, but then I don't get anything at all.  Here's what I have been doing (below).  </p>
  
  <p>Does anyone know how to change it so that I can open the page in a current version of Excel without getting the warning?</p>
  
  <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
  
      Response.AppendHeader("Content-disposition", "attachment; filename=Filename.xls")
      Response.ContentType = "application/vnd.ms-excel"
  
  
  End Sub
  </code></pre>