Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: HTML output to Excel

$
0
0
Re: HTML output to Excel
Web Connection 5.0
Re: HTML output to Excel
04/13/2012
02:24:44 PM
3H80UW2E5 Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None
How are you serving the data?

This works for me with IE 9 (and IE 9 in Compatibility mode):

FUNCTION ServeExcelDocument lcFile = FILETOSTR("c:\saved\Travel2012.xls") Response.ContentType="application/vnd.ms-excel" Response.Write(lcFile) ENDFUNC

and just saves the file to disk. Most other browsers just download the file. If you want more control you can also use the FileAttachment header. Look into Response.DownloadFile or Response.TransmitFile.

If you want to open the Excel document in the browser I think you need to send back a different format - .csv should work to open in Excel if it's just data.

+++ Rick ---


Ping . . . any thoughts here? Is this built into WWWC and perhaps I'm missing it? It seems like tighter browser security . . .



Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii

Viewing all articles
Browse latest Browse all 10393

Trending Articles