Click here to Skip to main content
16,021,417 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I have come across a situation where I need to convert Excel files into Powerpoint with one file in each slide using C#
Can anyone help me?

Regards,
Puspendu Adhikari
Posted
Updated 2-Jun-10 0:14am
v2
Comments
bellpatricia 5-Oct-17 3:53am    
Andrew mentioned below that Office Interop is free, but that's not true, actually far from it. In order to use Microsoft Excel Interop in c# you need to buy and install Microsoft Office. Also you need to have Microsoft Office installed on all machines where you're running your code, otherwise the execution will fail.

Compare to that the standalone 3td party can be a cheaper and a convenient solution. For instance, take a look at these: c# library for Excel and c# library for PowerPoint.
With those libraries you don't need to install and have Microsoft Office. Also there are couple of ways how you could do this conversion, for instance you could read an Excel file in c# and then generate a PPTX file in c# and add a slide with a table element for each sheet in your Excel file.

You've got a bit of work ahead of you...

You'll want to first settle on the API to use first. Your two main choices are:

1) Office Interop - Free, the API is not laid out in a straight forward way, and there are some potential hurdles to overcome to prevent locking up of the system.

For more information see: MSDN Office Interop[^] and Google Query[^]

2) Third Party Software - You're basically exchanging cost for a better API and more documentation (potentially :D). Ex. (Aspose[^]).

After you decide that, you'll just open up both an PowerPoint application and Excel Application copying each PowerPoint slide to Excel and saving a new file as needed.
 
Share this answer
 
Hi Puspendu Adhikari,

I also have this same question.
Did you have the code working already?

Thanks.
Sabrina :)
 
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