Forum OpenACS Development: Re: html table to excel

10: Re: html table to excel (response to 1)
Posted by Jade Rubick on
This still isn't working for me. I'd like to put this in the FAQ, and talk with Lars about documenting this for list-builder. Any other suggestions? The other threads in the link Dave suggested either use deprecated procs, or don't explain what they do (using .vuh files for example) or seem too complicated (using the .vuh files for example).

It displays on the screen very nicely, just doesn't pop up in Excel.

    set csv [list::write_output -name pan]
    set outputheaders [ns_conn outputheaders]
    ns_set cput $outputheaders "Content-Disposition" "attachment; filename=pan.csv"
    doc_return 200 "application/text" "$csv"

11: Re: html table to excel (response to 10)
Posted by Randy O'Meara on

Have you tried changing your MIME type to something different? Maybe "Application/"? You'll have to send the type that your browser has configured to pop the Excel application.