473,395 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 3996
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt | last post by:
I have an ASP page that calls ASP routines that I created that execute a database query and return the results to a recordset. I then iterate through the recordset and display the data in a table....
7
by: Jean | last post by:
Hello, I have a form that performs a search, according to criteria that a user enters into the text boxes. When the user clicks on „Search", a SQL string (say strSQL) is built up with the...
14
by: bonehead | last post by:
Greetings, I'm using the DoCmd.TransferText method to export the results of a MS Access query to a csv file. The csv will then be used to load an Oracle table. In other systems such as TOAD...
2
by: Marisol2 | last post by:
I have some queries in Access 2003 db that I have setup to display as pivots. I can go into design pivot table view and click on and then click on Export to Office MicroSoft Excel. The problem is I...
5
by: simbhasin | last post by:
Hi Champs - I need little help from you all. I am new to ASP and need to generate a code having functionality to export the query results to Excel. Right now, the user is getting the report on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.