Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
Zoltán Zörgő 6-Jan-13 6:10am    
Any progress?
Akkywadhwa 15-Jan-13 4:49am    
Nopes!

1 solution

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[^].
 
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