title: Why does my csv file open in a browser window and not in Excel - only in Safari
body: <p>Is there something special I need to know to get my csv file to open automatically in Excel when downloading with Safari (5.1)? At the moment it opens in a browser window, which doesn't happen in any other major browser, so I'm not sure if it's a browser setting or a proper bug that I need to fix.</p>
  
  <p>I'm adding headers like so:</p>
  
  <pre><code>Response.AddHeader("content-disposition:", "attachment;filename=exportglossary.csv");
  Response.ContentType = "text/csv";
  </code></pre>
  
  <p>I have had a brief look through the browser settings in Safari and can't see anything that looks to me like it would obviously fix this.</p>
  
  <p>I have seen that I can add:</p>
  
  <pre><code>header("Content-type: application/vnd.ms-excel")
  </code></pre>
  
  <p>instead of text/csv, but as it works in all other browsers I would rather not change it.</p>
  
  <p>Thanks :)</p>