Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,
Can somebody please help me with this.
I have this gridview and I have binded it properly,
now I have a button and I want to export the data inside the datagrid to excel.
I can do this in asp.net because the code is quite easy for the webform
but I am having a hard time in C# and it is a standalone application
I have googled it and found no step by step tutorial
I hope someone can help me
Thank you in advance.
Posted

 
Share this answer
 
Comments
serigraphie 16-May-11 5:08am    
unfortunately I received this error : Error 2 The type or namespace name 'excel' does not exist in the namespace 'Microsoft.Office.Interop' (are you missing an assembly reference?) D:\ProjectRepositories\TicketingService\ESPSTicketingService\ProjectSource\trunk\ESPSTicketingService\frmMain.cs 28 40 ESPSTicketingService
jcosep 17-May-11 20:16pm    
add your references see solution explorer then right click References then click add Reference then select COM tab then find component name EXCEL finally click add
 
Share this answer
 
Comments
jcosep 16-May-11 3:54am    
sir can you help me with my problem?

This is the link of my question:
http://www.codeproject.com/Questions/196766/Browse-Button-save-in-textBox.aspx

thanks in advance
serigraphie 16-May-11 5:08am    
I received this error :Error 2 The type or namespace name 'excel' does not exist in the namespace 'Microsoft.Office.Interop' (are you missing an assembly reference?) D:\ProjectRepositories\TicketingService\ESPSTicketingService\ProjectSource\trunk\ESPSTicketingService\frmMain.cs 28 40 ESPSTicketingService :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900