views:

66

answers:

2

I've looked through many topics and have yet to find a reliable answer to what I need, so here goes:

I'm looking to take multiple Excel sheets from a (.xlsx) document containing both tables and graphs, and embed the specified data in a new PowerPoint (.pptx) document using C# (VS 2010)

If you have any information on the topic or can point me in the right direction I'd be truly grateful.

+2  A: 

If you are trying to do this programatically you can look at Aspose, they have numerous tools that can help,

In your case it would be aspose.cells, and aspose.slides.

Aspose components aren't free though.

Dusty Roberts
I've currently got a system that uses Microsoft.office.interop for all my excel functions - which works wonders - I imagine there must be a way within these references to achieve what i need.I've previously used Aspose, about 3 years ago now, and felt the implementation was rusty at that time. Thanks for the info. though.
Byron Cobb
What i like about aspose tools is that it doesn't use any of the office libraries, and you do not need office installed on the server hosting the application (or for that matter the machine running the application). it's also faster (in my experience).
Dusty Roberts
That is indeed a good point! If i weren't so far into my project i'd think about Aspose again.Just saw you're from SA, i just moved from JHB to London ^_^
Byron Cobb
+3  A: 

Here's a good article on this subject: Inserting Excel Charts into PowerPoint 2007

Otaku
Thank you. This is perfect for what i need.
Byron Cobb
I wonder though - How safe is it to copy the Excel data onto the clipboard? If, while processing the data, the user manually copies data into the clipboard - Would the data conflict?Is there a different way? Maybe a way to create a mutex if needed?
Byron Cobb
The copy/paste in the code sample all seems to happen pretty instananeous, so I image the odds of someone copying to the clipboard between the Excel copy and the PowerPoint paste are extremely low. One way to get around any potential conflict is to copy the Excel chart to disk as an EMF file (I believe that is possible - I haven't researched it yet) and then insert it into PowerPoint from disk.
Otaku