Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Exporting data from Data Grid control to Excel Spreadsheet


Message #1 by "Chaithanya" <chaithanyak@s...> on Wed, 5 Mar 2003 12:08:09 +0530
Hello,

We have a requirement of exporting the data which is being displayed in a 
data grid control to a Excel spread sheet...

any help on  this ?

thanks in advance

chai
-----
Message #2 by "Dave Rezoski" <daverezoski@h...> on Wed, 05 Mar 2003 17:53:59 +0000
Here's one way to do it:

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


----Original Message Follows----
From: "Chaithanya" <chaithanyak@s...>
Reply-To: "ASP.NET" <aspx@p...>
To: "ASP.NET" <aspx@p...>
Subject: [aspx] Exporting data from Data Grid control to Excel Spreadsheet
Date: Wed, 5 Mar 2003 12:08:09 +0530

Hello,

We have a requirement of exporting the data which is being displayed in a
data grid control to a Excel spread sheet...

any help on  this ?

thanks in advance

chai
-----



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Message #3 by "Chaithanya" <chaithanyak@s...> on Thu, 6 Mar 2003 15:29:36 +0530
hey, thanks for the solution...but when i am trying to initiate the process
of exporting...its throwing this error

=====================
Control 'DataGridSearchResults__ctl2__ctl0' of type 'DataGridLinkButton'
must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control
'DataGridSearchResults__ctl2__ctl0' of type 'DataGridLinkButton' must be
placed inside a form tag with runat=server.

Source Error:


Line 121:			System.IO.StringWriter stringWriter = new
System.IO.StringWriter();
Line 122:			System.Web.UI.HtmlTextWriter htmlTextWriter = new
System.Web.UI.HtmlTextWriter(stringWriter);
Line 123:			DataGridSearchResults.RenderControl(htmlTextWriter);
Line 124:			Response.Write(htmlTextWriter.ToString());
Line 125:			Response.End();

================

any suggestion ???


-----Original Message-----
From: bounce-aspx-2939432@p...
[mailto:bounce-aspx-2939432@p...]On Behalf Of Dave Rezoski
Sent: Wednesday, March 05, 2003 11:24 PM
To: ASP.NET
Subject: [aspx] Re: Exporting data from Data Grid control to Excel
Spreadsheet


Here's one way to do it:

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


----Original Message Follows----
From: "Chaithanya" <chaithanyak@s...>
Reply-To: "ASP.NET" <aspx@p...>
To: "ASP.NET" <aspx@p...>
Subject: [aspx] Exporting data from Data Grid control to Excel Spreadsheet
Date: Wed, 5 Mar 2003 12:08:09 +0530

Hello,

We have a requirement of exporting the data which is being displayed in a
data grid control to a Excel spread sheet...

any help on  this ?

thanks in advance

chai
-----



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




  Return to Index