Note that there are some explanatory texts on larger screens.

plurals
  1. POXSLX not downloading properly on IE 8
    primarykey
    data
    text
    <p>I'm currently building a web application for a client. And i can't download an xlsx file with the originale IE8. Whereas it works with the IE8 compatibility mode of IE9.</p> <p>I'm using symfony 1.4, php 5.2.6. The xslx file is valid.</p> <p>My code :</p> <pre><code>$this-&gt;getResponse()-&gt;clearHttpHeaders(); $this-&gt;getResponse()-&gt;setHttpHeader('Pragma: public'); $this-&gt;getResponse()-&gt;setContentType('application/force-download'); $this-&gt;getResponse()-&gt;setHttpHeader('Content-Disposition', 'attachment; filename="Export_Excel.xlsx"'); $this-&gt;getResponse()-&gt;setHttpHeader('Content-Transfer-Encoding', 'binary'); $this-&gt;getResponse()-&gt;setHttpHeader('Connection', 'close'); $this-&gt;getResponse()-&gt;setContent($fileData); $this-&gt;getResponse()-&gt;sendHttpHeaders(); $this-&gt;getResponse()-&gt;send(); </code></pre> <p>IE 8 say it can't download, because he doesn't find the website or it doesn't answer, and to try later. This is not an url problem, because i can display a blank page with the same ulr.</p> <p>Moreover, this code</p> <pre><code> session_write_close(); $this-&gt;getResponse()-&gt;clearHttpHeaders(); $this-&gt;getResponse()-&gt;setHttpHeader('Pragma: public'); $this-&gt;getResponse()-&gt;setContentType('application/force-download'); $this-&gt;getResponse()-&gt;setHttpHeader('Content-Disposition', 'attachment; filename="Export_Excel.xlsx"'); $this-&gt;getResponse()-&gt;setHttpHeader('Content-Transfer-Encoding', 'binary'); $this-&gt;getResponse()-&gt;setHttpHeader('Connection', 'close'); @ob_end_clean(); flush(); @readfile(sfConfig::get('sf_web_dir').'/'.$filename.'.xlsx'); throw new sfStopException(); </code></pre> <p>Then the xslx file is downloaded as a zip file. Note the session_write_close(); Because the above code didn't work withouth that.</p> <p>Any ideas ? </p> <p>I wish to be able to download my file as a xslx file. (don't have to rename). The first bunch of code works with chrome, firefox, IE 9, IE9 compat IE 8, IE9 compat IE7. But not IE8.</p> <p><strong>UPDATE 2:</strong></p> <p>So the problem is really in the download part. My boss told me to temporary replace xlsx by csv, and i have the same exact problem to download the file. </p> <p>So any ideas to make the file download work with IE8 ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload