all groups > asp.net > may 2004 >
You're in the

asp.net

group:

How to output to excel.


How to output to excel. smen
5/31/2004 11:31:02 PM
asp.net:
hiye, i've got some data which i've query from the db and how do i get it into ms excel
Re: How to output to excel. smen
6/1/2004 12:11:04 AM
Re: How to output to excel. Steve C. Orr [MVP, MCSD]
6/1/2004 9:25:38 AM
This article explains in detail:
http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309so_l/asp200309so_l.asp

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



[quoted text, click to view]

Re: How to output to excel. avnrao
6/1/2004 12:13:07 PM
follow these steps.. get data into dataset/datareader
bind it to datagrid and render the control.

DataSet dsData = (DataSet) Session[PRISMWebConstants.REPORT_DATASET_KEY];
DataView dvData = new DataView(dsData.Tables[0]);
dvData.Sort = "Column ASC";

DataGrid dgTemp = new DataGrid();
dgTemp.DataSource = dvData;
dgTemp.DataBind();

StringWriter swData = new StringWriter();
HtmlTextWriter htmlTWData = new HtmlTextWriter(swData);

dgTemp.RenderControl(htmlTWData);
Response.Write(swData.ToString());
Response.End();

Av.
[quoted text, click to view]

AddThis Social Bookmark Button