469,282 Members | 1,949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

export sql query results to Excel

is it possible to generate an Exel file showing the results of an sql query
from an ASPX page?

Nov 19 '05 #1
4 3860
Dica,

I have example code to do this on my website at:
http://www.aboutfortunate.com?page=codelibrary

Use the search box there to search for "export excel" and you'll have the
code.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Dica" <s_*****@hotmail.com> wrote in message
news:af********************@rogers.com...
is it possible to generate an Exel file showing the results of an sql
query
from an ASPX page?

Nov 19 '05 #2
Hi Dear Dica,

is it possible to generate an Exel file showing the results of an sql query
from an ASPX page?

Yes, Ofcourse;

here is the link

VB.Net
=====

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using
Visual Basic .NET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~

http://support.microsoft.com/default...b;en-us;308247

C#
===

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using
Visual C# .NET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
http://support.microsoft.com/default...b;en-us;311194

For Anything and Everything, Please Let Me Know.

Bye
Venkat_KL
Nov 19 '05 #3

"Venkat_KL" <Ve******@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
Hi Dear Dica,

is it possible to generate an Exel file showing the results of an sql query from an ASPX page?

Yes, Ofcourse;

here is the link

VB.Net
=====

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using
Visual Basic .NET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~

http://support.microsoft.com/default...b;en-us;308247

C#
===

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using
Visual C# .NET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
http://support.microsoft.com/default...b;en-us;311194

For Anything and Everything, Please Let Me Know.

Bye
Venkat_KL


perfect. thanks guys.

Nov 19 '05 #4
PL

Problem with these solutions and the print htmlt able solution is that
it is only good for very simple excel sheets that do not need to have
multiple pages or formulas in them.

There are commercial ASP.NET solutions for this, and I belive, if you have office
installed on the server you can (at least you could in classic ASP) instatiate
an Excel.Application object and operate on it.

I would guess you need to wrap the com object to be able to do that in .NET

PL.

"Venkat_KL" <Ve******@discussions.microsoft.com> skrev i meddelandet news:E0**********************************@microsof t.com...
Hi Dear Dica,

is it possible to generate an Exel file showing the results of an sql query
from an ASPX page?

Yes, Ofcourse;

here is the link

VB.Net
=====

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using
Visual Basic .NET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~

http://support.microsoft.com/default...b;en-us;308247

C#
===

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using
Visual C# .NET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
http://support.microsoft.com/default...b;en-us;311194

For Anything and Everything, Please Let Me Know.

Bye
Venkat_KL

Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.