Click here to Skip to main content
15,908,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

Process :

Reports are being generated in excel. then it is converted as pdf.
So , How to merge multiple excel files to single excel to convert as one pdf.

Thank you,
B.Velmurugan
Posted
Comments
Sergey Alexandrovich Kryukov 23-Mar-12 0:52am    
Why not simply combine several Excel documents in one PDF?
--SA

1 solution

One option is as follows:

1. Create a new excel file using Microsoft.Office.Interop.Excel.
2. Open each of the excel file and write contents to the newly created excel file.
3. Save the newly created excel file.
4. Generate the PDF file from the newly created excel file.

An example for using Microsoft.Office.Interop.Excel is given here.
http://msdn.microsoft.com/en-us/library/ms173186(v=vs.80).aspx[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 23-Mar-12 0:52am    
Please see my comment to the question. Isn't that better?
--SA
ProEnggSoft 23-Mar-12 0:58am    
Do you mean from Excel application? I could not get the point. Can you please elaborate. I was thinking that the OP wants to generate combined excel file from within C# program. Thank you
Sergey Alexandrovich Kryukov 23-Mar-12 1:12am    
Not too much to elaborate...

I mean: open one Excel file, get data, create PDF data, add to PDF document, open another Excel file, append/insert to the same PDF document...

In "to single excel to convert as one DPF" OP never mentioned that "single excel" is needed by itself. Why complicate a simpler problem?

--SA
ProEnggSoft 23-Mar-12 1:26am    
Thank you. I understood. You are correct.

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