Go Back   DeveloperBarn Forums > Programming & Scripting > .Net Development

Sponsored Links

Discuss "export gridview to excel add multiple sheets" in the .Net Development forum.

.Net Development - Learn about the Microsoft.Net framework and how to create powerful web-based (ASP.net) and client-based (Windows Forms) applications utilizing various languages such as C#, VB.Net, J# and others.


Reply « Previous Thread | Next Thread »  
 
LinkBack Thread Tools Display Modes
  #1  
Old September 2nd, 2008, 11:56 AM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 174
Thanks: 14
Thanked 0 Times in 0 Posts
Rep Power: 1
peebman2000 is an unknown quantity at this point
Question export gridview to excel add multiple sheets

Hey everyone its peeb hope all is well with everyone at developerbarn forums. I need a little help, I create reports sometimes with a gridview and export the data to excel. Lets say I have like multiple gridviews and I wanted to export each gridview to excel under its own spreadsheet.

So gridview1, gridview2, gridview3 are exported to excel under $heet1, $heet2, $heet3.

I know how to export multiple gridviews to 1 excel sheet but I don't know how to export them separately under their own spreadsheet.

I've been researching online, and i'm continously searching, but does anyone know how to do what i'm trying to do with the gridview and excel or is this not possible?

I appreciate any help or ideas, thanks.

Peeb
Reply With Quote
Sponsored Links
  #2  
Old September 6th, 2008, 04:14 PM
jmurrayhead's Avatar
The Barnfather

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 820
Thanks: 20
Thanked 74 Times in 71 Posts
Blog Entries: 5
Rep Power: 3
jmurrayhead has a spectacular aura aboutjmurrayhead has a spectacular aura aboutjmurrayhead has a spectacular aura about

Awards Showcase
Microsoft SQL Server Microsoft Windows Microsoft .Net Classic ASP 
Total Awards: 4

Default

See if this is of any help: Export data to multiple sheets of Excel doc by Mahesh Chand
__________________
jmurrayhead
If you agree with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

Join our Folding team: DeveloperBarn Folding
Reply With Quote
  #3  
Old September 9th, 2008, 10:03 AM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 174
Thanks: 14
Thanked 0 Times in 0 Posts
Rep Power: 1
peebman2000 is an unknown quantity at this point
Thumbs up reply

Hey thanks jmurrayhead, I saw that article; I haven't had a chance to mess with it. I'll probably mess with it this week, If I can't get it to work the way I want to do it, i'll probably just use reporting services.

I really don't like reporting services thats why I wanted to do this way using a repeater. But I'll let you know how it turns out.

You'll hear from me again, anyway thanks for the reply.

Quote:
Originally Posted by jmurrayhead View Post
Reply With Quote
  #4  
Old September 16th, 2008, 09:07 AM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 174
Thanks: 14
Thanked 0 Times in 0 Posts
Rep Power: 1
peebman2000 is an unknown quantity at this point
Question reply

Hey Jmurrayhead, i started messing with the multiple exce sheet link, but i'm having trouble to add reference to Excel.dll using Add Reference. I've been researching on line and I've been trying to add it to my bin folder as a reference, but Microsoft.Office.Interop.Excel.dll is not an option to add.

Any ideas on how to add the excel.dll as a reference?


Thanks.
Reply With Quote
  #5  
Old September 16th, 2008, 09:22 AM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 174
Thanks: 14
Thanked 0 Times in 0 Posts
Rep Power: 1
peebman2000 is an unknown quantity at this point
Default something else

I've found something online to add Imports Microsoft.Office.Interop.excel from the COM tab from the add reference box. and now I can reference Microsoft.Office.Interop.Excel.Workbooks.

Which is different from Dim xlBooks As Excel.Workbooks from the link. I"m still working with it.
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > .Net Development

Bookmarks

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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV File Export Tip... Lauramc SQL Server Reporting Services Help 0 August 1st, 2008 01:15 PM
Getting data from a selected row in a gridview peebman2000 .Net Development 3 July 31st, 2008 12:18 PM
update gridview dynamically peebman2000 .Net Development 27 May 8th, 2008 10:03 PM
add additional footer to gridview peebman2000 .Net Development 13 May 2nd, 2008 01:50 PM
export to excel function prompt help Rebelle JavaScript Programming 2 April 14th, 2008 10:40 AM


All times are GMT -4. The time now is 07:57 PM.



Content Relevant URLs by vBSEO 3.2.0