Export datagrid to .pdf in vb.net
-
Friday, June 22, 2012 5:43 PM
I am having a datagridview i want to export my data directly in .pdf format . How can i do it.
Thank You
All Replies
-
Friday, June 22, 2012 6:37 PM
- Proposed As Answer by Mark Liu-lxfModerator Friday, June 29, 2012 9:43 AM
- Marked As Answer by Mark Liu-lxfModerator Tuesday, July 03, 2012 8:56 AM
-
Monday, June 25, 2012 5:06 AMModerator
Hi ankitguptajpr,
Welcome to the MSDN forum.
Here is another solution: save the data into Excel and use Excel to save the data as pdf file.
Here is some information about this solution:
How to export a DataGridView to Excel (VB2010): http://social.msdn.microsoft.com/Forums/en-GB/vblanguage/thread/ef367517-9bda-416b-abd8-b25fa915f617
Workbook.SaveAs Method: http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.saveas(v=vs.100).aspx
Hope this helps.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us
-
Tuesday, June 26, 2012 6:20 PMYa that solution i know but i want to know can't i do it directly . Export to pdf directly from datagrid ?
-
Tuesday, June 26, 2012 6:30 PMThere is not one VB keyword to do this. In the link I provided, you find the PDF file documentation. You can write the code to export to a PDF file.
Armin

