Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Can We Export Data from Gridview into Excel and Directly attach the Excel file to Textbox?


Or

Can we Export Data from Gridview into Excel and Directly can we send a mail to the concerned person?


Is it possible guys?

I need Help :)


Regards
Harsha
Posted
Updated 2-Jul-12 20:25pm
v2
Comments
Sandeep Mewara 3-Jul-12 2:58am    
did you try to find about it before asking here? Tried to Google or Bing?

 
Share this answer
 
Comments
Harsha Dev 3-Jul-12 3:00am    
gud link vani thanks :)
Vani Kulkarni 3-Jul-12 3:03am    
Thanks Harsha! :) Hope it helped you.
Harsha Dev 3-Jul-12 5:19am    
yeah it help me a lot :)
Yes Harsha you can easily export Data from Gridview into Excel.
you can take the gridview data into a datatable and using this following dll
RKLibExportData.dll[^] u can easily export Data from Gridview into Excel.

and the code that will help you is mentioned below
RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Win");
                objExport.ExportDetails(dtEmployee, Export.ExportFormat.Excel, "D:\\"+filename+"_CollectionDetails.xls");
 
Share this answer
 
Comments
Harsha Dev 3-Jul-12 2:46am    
yeah... but can we attach the exported data(ie Excel) from gridview into textbox using button click event... :)

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