Hi Roland, Thanks for this, but I wasn't able to get it to work. Probably because I'm runing an older version of Witango (actually Tango 4.5)
However, the suggestion by Dave Machin worked like a charm. Thanks to both of your for your help! > -----Original Message----- > From: Roland Dumas [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 2:50 PM > To: [email protected] > Subject: Re: Witango-Talk: Excel file? > > > I forgot which nice person on this list share this with me, but > here it is: > > You get your resultset or what you want in the excel file into an > array or a > variable containing an html table. > > That's in your query action > Then you create a text action that has this in it: > > <@EXCLUDE> > <@ASSIGN local$DebugMode "ForceOff"> > <@ASSIGN local$FileExtension ".xls"> > <@ASSIGN local$FileName value="web_name_export"> <@comment>or whatever you > want the file to be named.</@comment> > <@ASSIGN local$Tab '<@CHAR CODE="9">'> > <@ASSIGN local$httpHeader 'HTTP/1.1 <@HTTPSTATUSCODE> > <@HTTPREASONPHRASE><@CRLF>Content-type: > application/vnd.ms-excel<@CRLF>Content-Disposition: attachment; > filename=<@VAR local$FileName><@VAR local$FileExtension><@CRLF>Location: > http://<@CGIPARAM SERVER_NAME>/<@VAR local$FileName><@VAR > local$FileExtension><@CRLF><@CRLF>'> > <@ASSIGN local$encodeResults FALSE> > <@PURGERESULTS> > </@EXCLUDE><@PURGERESULTS><@var request$exceldata encoding="none"> > > ---- > Then your excel file will automatically download. > > > On 4/7/05 11:35 AM, "Dave Machin" <[EMAIL PROTECTED]> wrote: > > > If you take a result set (which is basically an HTML table) and > write it to > > a file with a .xls extension and then offer a link to the user > to open that > > file, Excel will open it quite nicely (since it does a good job > of importing > > HTML tables). I think you can also open the result set in a > new window with > > modified headers telling the browser that the content is Excel > and it should > > do the same thing. > > > > ----- Original Message ----- > > From: "Tom Ferguson" <[EMAIL PROTECTED]> > > To: <[email protected]> > > Sent: Thursday, April 07, 2005 11:31 AM > > Subject: Witango-Talk: Excel file? > > > > > >> I have a result set I need in a MS Excel file. I can cut it > and paste it, > >> but I was wondering if I can write an Excel file directly from Witango? > >> Anyone tried this? > >> > >> Thanks! > >> > >> Thomas Ferguson > >> Vice President > >> Enroll DR, LLC > >> 710 94th Ave. N. #304 > >> St. Petersburg, Florida 33701 > >> > >> www.enrolldr.com > >> > >> > ________________________________________________________________________ > >> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > >> > >> > > > > > > ________________________________________________________________________ > > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > > > > ----------------------------------------- > Roland Dumas > Roberts Information Services > 310 W. Bellevue Avenue > San Mateo CA 94402 > 650-347-1373 > 415-412-9300 (cell) > [EMAIL PROTECTED] > SMS: http://new.servqual.com/html/sms.tml > > > ________________________________________________________________________ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
