RE: Use ASP/SQL to export to Excel?

by "Charlton, Mark" <Mark.Charlton(at)saint-gobain.com>

 Date:  Tue, 17 Apr 2001 14:37:52 -0400
 To:  "'Mike Taylor'" <lonewolf(at)one.net>,
hwg-techniques(at)hwg.org
  todo: View Thread, Original
What I did to export data is to have a page built in ASP which builds it as
a CSV page.  It takes the format and produces it as a plain file.  The user
is then directed to save the page with a CSV extension and then they can
just open it in Excel as a csv file.  

The only proviso is that you have to strip the data of any commas so that it
doesn't damage the layout.  That done you can just output it as a text page.

It seems to be working fine for me.  If you want I can send you my template.
I pass it a SQL string and a few other variables.  It then formats any data
I send it.  It works for any SQL select statement I need to export.  I just
need to put a button at the bottom of a page to export the data.
 
HTH
Mark


-----Original Message-----
From: Mike Taylor [mailto:lonewolf(at)one.net]
Sent: Tuesday, April 17, 2001 10:54 AM
To: hwg-techniques(at)hwg.org
Subject: Use ASP/SQL to export to Excel?


I have an ASP page written in VBScript I've put together for some in-house
reps to display data from a SQL database.  This data is generated on the
page in, of course, HTML format.  I've gotten requests about clicking on a
link that will generate the same info in Excel format.

The only way I know of to do this would be to run a SQL job that exports
to that format, but I see no way of triggering that from the client's
machine.

Is there another way to do this?

Thanks,
Mike Taylor

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.