473,573 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4001
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_*****@hotmai l.com> wrote in message
news:af******** ************@ro gers.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******@discu ssions.microsof t.com> wrote in message
news:E0******** *************** ***********@mic rosoft.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.Applicati on 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******@discu ssions.microsof t.com> skrev i meddelandet news:E0******** *************** ***********@mic rosoft.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
5017
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. Before I iterate through the recordset I instruct the browser that the content type is Excel using the following line: (Response.ContentType =...
7
8494
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 criteria. Then a list box RowSource property is set to this strSQL, to display the results of the search. StrSQL is a global variable within this...
14
6423
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 for Oracle, it's possible to force an additional comma delimiter after the last column, if the column is empty on a particular row. Oracle requires...
2
4029
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 have about 6 queries that produce 48 reports (based on parameters). I don't want to manually save each pivot query results. The first macro I...
5
7243
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 the page itself and now i need to provide him fuctionality to export the same results in excel. I need to provide a button on the top and with the...
0
7747
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8180
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8036
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6363
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5557
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5263
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3703
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2167
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.