User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 392,094 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,867 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 1280 | Replies: 4
Reply
Join Date: Dec 2006
Location: United States
Posts: 612
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 14
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Help with Excel Export

  #1  
Aug 16th, 2007
hi,

I want to export data to Excel from Dataset and DataGrid and format the output excel file like "Auto Fit" for coulns, Bold headers and also control the Cells.

Please dont suggest using Interop Calls.
I understand that we can use the RenderControl to write to the htmltextwriter so may be someone can enhance on this.


I need the .NET equivalent.
Last edited by binoj_daniel : Aug 16th, 2007 at 3:07 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Posts: 1
Reputation: kekechen is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kekechen kekechen is offline Offline
Newbie Poster

Re: Help with Excel Export

  #2  
Aug 23rd, 2007
HI,

I recommand spire.xls component, It's easy to use,
may useful to you.
http://www.e-iceblue.com
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 612
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 14
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: Help with Excel Export

  #3  
Aug 23rd, 2007
I have a limitation. i cannot use any thirdparty component. Any other idea?
Reply With Quote  
Join Date: Apr 2008
Posts: 1
Reputation: ericsonvv is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ericsonvv ericsonvv is offline Offline
Newbie Poster

Re: Help with Excel Export

  #4  
Apr 20th, 2008
Originally Posted by binoj_daniel View Post
hi,

I want to export data to Excel from Dataset and DataGrid and format the output excel file like "Auto Fit" for coulns, Bold headers and also control the Cells.

Please dont suggest using Interop Calls.
I understand that we can use the RenderControl to write to the htmltextwriter so may be someone can enhance on this.


I need the .NET equivalent.


you can export from datagridview to excel

For i = 0 To DataGridView1.RowCount - 2
For j = 0 To DataGridView1.ColumnCount - 1
xlWorkSheet.Cells(i + 1, j + 1) = _
DataGridView1(j, i).Value.ToString()
Next
Next


follow this :

http://vb.net-informations.com/excel...w_to_excel.htm
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 612
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 14
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: Help with Excel Export

  #5  
Apr 23rd, 2008
As i wrote in my original post Please dont suggest using Interop Calls. Also Iam looking for formatting techniques.

Originally Posted by ericsonvv View Post
you can export from datagridview to excel

For i = 0 To DataGridView1.RowCount - 2
For j = 0 To DataGridView1.ColumnCount - 1
xlWorkSheet.Cells(i + 1, j + 1) = _
DataGridView1(j, i).Value.ToString()
Next
Next


follow this :

http://vb.net-informations.com/excel...w_to_excel.htm
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb VB.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 12:44 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC