Forum OpenACS Development: Re: html table to excel

2: Re: html table to excel (response to 1)
Posted by Brad Duell on
The following in tcl should do what you want:

} - on_submit {
  ReturnHeadersNoCache "application/" $filename
  db_foreach .... {
      ns_write $first_column\t$second_column\n

ReturnHeadersNoCache is deprecated, but gives you the content_type and filename support.

Having the Excel sheet show up in the browser automatically, or having the option to save to file is a user-specific option.