Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Excel PDF
Hi guys,
Can anyone help me to generate a macro using c#. I want that macro to be enabled after selecting 2 columns and generate pdf files with a particular format as follows:
 
FILE 1
 
XYZ School,USA
Name ValueOfColumn1&Row1
 
Age ValueOfColumn2&Row1
 

 

FILE 2
 
XYZ School,USA
Name ValueOfColumn1&Row2
 
Age ValueOfColumn2&Row2
 

 
Please help me out!
Thanks,
Akkywadhwa
Posted 5-Jan-13 1:58am
Comments
Zoltán Zörgő at 6-Jan-13 6:10am
   
Any progress?
Akkywadhwa at 15-Jan-13 4:49am
   
Nopes!

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Macro using c#? C# is not a macro language - you either do your job using Excel VBA or C#... From Excel 2007 and above you can export to PDF without any external component, but you need to make your "file" as a sheet of the workbook to look as you desire. Than you can change the worksheet's content and generate the pdf's one by one. Here is a sample of how to use VBA to export to PDF: http://excelvbaandmacros.blogspot.hu/2012/01/excel-create-pdf-from-excel-worksheet.html[^], related official support: http://msdn.microsoft.com/en-us/library/office/ee834871(v=office.11).aspx[^].
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100