473,508 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid to Excel

I wish to save the data of a grid to Excel. But there is a little
twist to it:

The user should immidiatly get the "Save as.." dialog.

1. I don't wish to save the xls-file serverside.
2. I don't wish to show the xls to the user on-screen.

Is what I ask for possible? Or am I missing out on a more proper
approach?

Help is greatly appreciated. Thx in advance.
Regards /Snedker
Nov 19 '05 #1
3 1340
There are a variety of ways to export ASP.NET content to Excel.
The DataGrid technique described in this article meets your requirements:
http://SteveOrr.net/articles/ExcelExport.aspx

Here's another option worth browsing:
http://SteveOrr.net/articles/ExportPanel.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
news:s1********************************@4ax.com...
I wish to save the data of a grid to Excel. But there is a little
twist to it:

The user should immidiatly get the "Save as.." dialog.

1. I don't wish to save the xls-file serverside.
2. I don't wish to show the xls to the user on-screen.

Is what I ask for possible? Or am I missing out on a more proper
approach?

Help is greatly appreciated. Thx in advance.
Regards /Snedker

Nov 19 '05 #2
On Tue, 14 Jun 2005 13:15:09 -0700, "Steve C. Orr [MVP, MCSD]"
<St***@Orr.net> wrote:

Just what I needed. Thank you.

/Regards
Nov 19 '05 #3
On Tue, 14 Jun 2005 10:46:16 +0200, Morten Snedker
<morten_spammenot_ATdbconsult.dk> wrote:

I ended up with a XML-document that i simply gave the XLS-extension..
bit of a cheat, but it works like a charm ;-)

Regards /Snedker
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
10901
by: Ugo | last post by:
Hi, I am having a problem exporting a Datagrid to excel in asp.net. For some reason I am getting a blank excel page. I set up in IIS the Mime for ..xls. My code is below any help would be...
3
3504
by: Syd | last post by:
Hi all, Is there a way to get data from a datagrid and send to an excel table?And if it is possible how can arranged the excel table... Thanks
2
2465
by: Steve Chatham | last post by:
I use the following code: Private Sub RbtnExport_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RbtnExport.SelectedIndexChanged Dim sFile As String =...
1
2124
by: Ed Chiu | last post by:
Hi, I copied the following codes from Internet to export datagrid to Excel, it works with datagrid not supporting sorting or paging. Response.ContentType = "application/vnd.ms-excel"...
2
2839
by: TM | last post by:
I have an Excel sheet where I setup my needed formatting, page settings, ect, and would like to take my data from a datagrid and paste it into the excel file and print the excel file. Any idea...
5
1813
by: Dave | last post by:
In a VB.NET application, I have a datagrid that I export to an Excel spreadsheet like this: ' Set the content type to Excel Response.ContentType = "application/vnd.ms-excel" Dim tw As New...
1
1381
by: steve | last post by:
Hi, I have generated a datagrid with the following columns: | Date-Time | Station ID | Parameter1 | .... | Parameter 2| I would like to: Create an Excel file and preferably give the user...
4
3916
by: Frank | last post by:
Hello All, I ham using VS.NET 2003. Have followed instructions from http://gridviewguy.com/ArticleDetails.aspx?articleID=26 along with several other articles to no avail. I am pulling my hair...
0
5256
by: letsgetsilly | last post by:
I am populating a datagrid and outputting it to excel. Everything worked well last night, but today excel only displays the content in font color white, which is impossible to see. The data is all...
6
2723
by: slinky | last post by:
I found the following code to transfer datagrid data to an Excel file. Is this written in C#?... I'm a vb.netter. I'm just not sure where to place the code to experiment on it. Should I place it in...
0
7225
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
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7385
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...
1
5053
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...
0
4707
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...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1558
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 ...
0
418
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...

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.