471,853 Members | 1,284 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,853 software developers and data experts.

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 3941
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.

Similar topics

1 post views Thread by Matt | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.