Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Datagrid to Excel

This is a discussion on Datagrid to Excel within the VB.NET forums, part of the Software Development category; How to export data from datagrid to excel sheet using VB.NET...

Go Back   Geeks Talk > Software Development > VB.NET
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

VB.NET Visualbasic.NET

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2009
Junior Member
 
Join Date: Jul 2008
Location: Nasik
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sumit13 is on a distinguished road
Datagrid to Excel

How to export data from datagrid to excel sheet using VB.NET
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-03-2009
Junior Member
 
Join Date: Mar 2009
Location: swinton
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
erics44 is on a distinguished road
Re: Datagrid to Excel

Private sub exportgridview() response.clear() response.addheader("content-disposition", "attachment; filename=filename.xls") response.charset = "" response.contenttype = "application/vnd.ms-excel" dim stringwrite = new system.io.stringwriter() dim htmlwrite = new htmltextwriter(stringwrite) gridview1.rendercontrol(htmlwrite) response.write(stringwrite.tostring()) response.end() gv = nothing end sub public overloads overrides sub verifyrenderinginserverform(byval control as control) ' confirms that an htmlform control is rendered for the 'specified asp.net server control at run time. End sub
Reply With Quote
  #3 (permalink)  
Old 04-03-2009
Junior Member
 
Join Date: Mar 2009
Location: swinton
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
erics44 is on a distinguished road
Re: Datagrid to Excel

Private sub exportgridview(byval gv as gridview) response.clear() response.addheader("content-disposition", "attachment; filename=filename.xls") response.charset = "" response.contenttype = "application/vnd.ms-excel" dim stringwrite = new system.io.stringwriter() dim htmlwrite = new htmltextwriter(stringwrite) gv.rendercontrol(htmlwrite) response.write(stringwrite.tostring()) response.end() gv = nothing end sub public overloads overrides sub verifyrenderinginserverform(byval control as control) ' confirms that an htmlform control is rendered for the 'specified asp.net server control at run time. End sub
Reply With Quote
  #4 (permalink)  
Old 04-03-2009
Junior Member
 
Join Date: Mar 2009
Location: swinton
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
erics44 is on a distinguished road
Re: Datagrid to Excel

Private sub exportgridview() response.clear() response.addheader("content-disposition", "attachment; filename=filename.xls") response.charset = "" response.contenttype = "application/vnd.ms-excel" dim stringwrite = new system.io.stringwriter() dim htmlwrite = new htmltextwriter(stringwrite) gridview1.rendercontrol(htmlwrite) response.write(stringwrite.tostring()) response.end() gridview1= nothing end sub public overloads overrides sub verifyrenderinginserverform(byval control as control) ' confirms that an htmlform control is rendered for the 'specified asp.net server control at run time. End sub
Reply With Quote
  #5 (permalink)  
Old 04-03-2009
Junior Member
 
Join Date: Mar 2009
Location: swinton
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
erics44 is on a distinguished road
Re: Datagrid to Excel

why cant i put text on different lines?

stoopid
Reply With Quote
Reply

  Geeks Talk > Software Development > VB.NET

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Datagrid sravee123 ASP.NET 1 10-08-2008 09:30 AM
Adding new row to DataGrid riswadkarharshad ASP.NET 2 09-23-2008 03:23 AM
Checkbox in Datagrid Mirunab C# 1 05-12-2008 03:14 AM
Read excel values into script without opening excel nemishdmehta QTP 1 02-11-2008 07:19 AM
datagrid glatha C# 1 06-05-2007 09:50 AM


All times are GMT -4. The time now is 06:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved