Re: Open an Excel File in Excel, not HTML

Discussion in 'HTML' started by viza, Jul 8, 2008.

  1. viza

    viza Guest

    Hi

    On Mon, 07 Jul 2008 18:18:43 -0400, sheldonlg wrote:

    > I have an Excel file residing on the server. When the user clicks a
    > button to I send a stream with the following header info:
    >
    > Content-type: application/octet-stream Content-Disposition: attachment;
    > filename=something.xls Pragma: no-cache
    > Expires: 0
    >
    > followed by the html description of the Excel table.


    What on earth does that mean? Are you sending html or excel?

    If Excel, then try setting the correct content type, something like
    application/x-ms-excel. MS do document these somewhere.

    If you are sending an html table and would like it to be opened in Excel,
    then you are simply not allowed. By sending the wrong filename extension
    you are trying to exploit a bug in some versions of Internet Explorer,
    which is quite a dubious thing to do. It is certainly not a "feature"
    that is meant to be used that way.

    viza
    viza, Jul 8, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    774
    Ed Mullen
    Aug 3, 2007
  2. eddie wang
    Replies:
    0
    Views:
    392
    eddie wang
    Oct 3, 2003
  3. Schüle Daniel

    File::open and File.open

    Schüle Daniel, Oct 23, 2006, in forum: Ruby
    Replies:
    4
    Views:
    178
    Rick DeNatale
    Oct 24, 2006
  4. Matt
    Replies:
    1
    Views:
    451
    Michael Winter
    Aug 22, 2004
  5. Replies:
    0
    Views:
    106
Loading...

Share This Page