Forums

This topic is locked

Export results to Excel format

Posted 06 May 2002 19:04:07
1
has voted
06 May 2002 19:04:07 Mike Willis posted:
Anyone have any suggestions as to how I could create a link that would allow the user to export his/her result page to a MS Excel format? I know I've seen it done but haven't a clue as to how they did it.

Thanks!

Replies

Replied 07 May 2002 21:55:07
07 May 2002 21:55:07 josh padilla replied:
packages:
strip html
convert text/numbers
to tab delimited
open with excel
edit

aka install an extension
Replied 08 May 2002 09:54:28
08 May 2002 09:54:28 Viktor Farcic replied:
If you're using ASP/VBScript, write this at the top of the page:
<%Response.ContentType = "application/vnd.ms-excel"%>

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Anyone have any suggestions as to how I could create a link that would allow the user to export his/her result page to a MS Excel format? I know I've seen it done but haven't a clue as to how they did it.

Thanks!
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 03 Mar 2003 16:41:39
03 Mar 2003 16:41:39 Adam Davies replied:
That works, but one answer I can't seem to find is how to break it up so that for example name goes into one cell then address1 goes into another etc. also if a field is blank on the database when it comes to downloading into a excel format how would I let it know that if the field was blank then ignore and move onto the next cell???
Quote
If you're using ASP/VBScript, write this at the top of the page:
&lt;%Response.ContentType = "application/vnd.ms-excel"%&gt;
Quote

Replied 05 Mar 2003 23:04:16
05 Mar 2003 23:04:16 Dennis van Galen replied:
put your data in a table and send it with the proper mime type (above mentioned application type) to the browser, this could help:
www.dmxzone.com/go?3907

You can even format your excel sheet this way, much easier than using the new html for excel which you could also use.

Oh, don't forget about content disposition to force it in the browser and if you don't want to use tables then you must use seperators that the Excel plugin understands.
example with tables:
www.aspalliance.com/stevesmith/articles/exceltutorial.asp

Here is a sample using Excel language, it creates a graph:
www.serverwatch.com/tutorials/article.php/1493371

HTH

with kind regards,

Dennis van Galen
DMXzone Manager
FAQ, Tutorial and Extension Manager


Studio MX / CFMX PRO / SQL 2000 / NT4 AND win2kPRO / IIS5

Edited by - djvgalen on 05 Mar 2003 23:20:12

Reply to this topic