473,563 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

export to excel

Hi,

I'm looking for some way to export data from my asp.net page to excel
speadsheet. I'm generating some table containing raports and other tabular
data and I need some way to export it to excel and maybe to acces. Can
anyone give me some clues? I'v tried to change content of page to
application/excel (or something like this - don't remember right now), it
works for some data, but for larger or more complex tables it ends up with
'unable to open file' error. I was wondering what causes that. Maybe some
rowspans or nested tables?

--
Regards
Marius
Nov 19 '05 #1
3 3391
Hi Mariusz,
Look at

http://support.microsoft.com/default.aspx?scid=kb;en-
us;317719

HTH

Elton Wang
el********@hotm ail.com
-----Original Message-----
Hi,

I'm looking for some way to export data from my asp.net page to excelspeadsheet. I'm generating some table containing raports and other tabulardata and I need some way to export it to excel and maybe to acces. Cananyone give me some clues? I'v tried to change content of page toapplication/excel (or something like this - don't remember right now), itworks for some data, but for larger or more complex tables it ends up with'unable to open file' error. I was wondering what causes that. Maybe somerowspans or nested tables?

--
Regards
Marius
.

Nov 19 '05 #2
There are a variety of ways to export ASP.NET content to Excel.
Most of the techniques are described in detail here:
http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/ExportPanel.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Mariusz" <ma**@post.pl > wrote in message
news:42******** @news.home.net. pl...
Hi,

I'm looking for some way to export data from my asp.net page to excel
speadsheet. I'm generating some table containing raports and other tabular
data and I need some way to export it to excel and maybe to acces. Can
anyone give me some clues? I'v tried to change content of page to
application/excel (or something like this - don't remember right now), it
works for some data, but for larger or more complex tables it ends up with
'unable to open file' error. I was wondering what causes that. Maybe some
rowspans or nested tables?

--
Regards
Marius

Nov 19 '05 #3
Hi,

Thanx.
Actually I did almost the same but I forgot to turn off the viewstate and
this was the reason why i was unable to open exported files.

--
Mariusz
Look at

http://support.microsoft.com/default.aspx?scid=kb;en-
us;317719

HTH

Elton Wang
el********@hotm ail.com
-----Original Message-----
Hi,

I'm looking for some way to export data from my asp.net

page to excel
speadsheet. I'm generating some table containing raports

and other tabular
data and I need some way to export it to excel and maybe

to acces. Can
anyone give me some clues? I'v tried to change content of

page to
application/excel (or something like this - don't

remember right now), it
works for some data, but for larger or more complex

tables it ends up with
'unable to open file' error. I was wondering what causes

that. Maybe some
rowspans or nested tables?

--
Regards
Marius
.

Nov 19 '05 #4

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

Similar topics

1
5016
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 =...
5
3759
by: Maria L. | last post by:
Hi, I need to export the content of a DataGrid (in Windows application in C#), into an Excel spreadsheet. Anyone knows how to do this? Any code snippets would help! thanks a lot, Maria
2
3981
by: Siu | last post by:
Hi, I use the following code to export and import a file Excel from resp. into a Web page with the following code: //EXPORT Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; this.EnableViewState = false;
6
4053
by: Elena | last post by:
I'm trying to export data to an Excel worksheet. I can export the data in the cell values perfectly. I need the code to change a header and footer for the worksheet, not for the columns. Is this possible? If so, I really need the code immediately. Thank you, Elena
13
13193
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel" HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=ABC.xls") HttpContext.Current.Response.Write(strHTML) HttpContext.Current.Response.End() However when the user tries to...
5
31901
by: Simon | last post by:
Dear reader, With the export command you can export a query to Excel. By activate this command a form pop's up with the following text:
1
9760
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm having I'd be most appreciative. The database is already constructed, I'm just wanting to export the data to an excel file. In short, I'm hoping...
1
10473
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 ...
3
7134
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this file but save it as an excel file. The data in this excel file will be imported into an Access database. The
2
6395
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the method.... it creates 6 sheets # region Namespaces using System;
0
7659
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
7580
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
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
6244
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
5481
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
5208
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
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.