Click here to Skip to main content
15,899,634 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
can i export specific record from gridview to word
Posted
Comments
Sergey Alexandrovich Kryukov 1-Oct-13 15:26pm    
When you say "Grid View", the question is "which one"? Exact type name, please.
—SA

Please see my comment to the question. Don't export grid view, export the data used to populate this grid view. It will help you in many ways, first of all, in code maintenance. You already have some data layer represented by your database. Generate the documents out of the database, using the same query you used to populate the controls.

To work with Word, you can use either Office interop assembly or Open XML DSK. Please see my past answers. I put most of the link to my answers in this one:
How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010[^].

—SA
 
Share this answer
 
You need to have a look at this one:
Export selected rows of gridview to Excel or word in ASP.Net[^]
 
Share this answer
 

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