views:

83

answers:

1

I'm currently considering a number of options for copying an excel sheet into a powerpoint presentation.

  1. Using VBA select a excel sheet, copy the range and place it into a newly created powerpoint slide as an image.
  2. I create excel automated html of a sheet, once that html is saved(initially), i create an image off of the html.
  3. Using VSTO, i open Excel copy each object and paste it into a new powerpoint slide, using the clipboard(or another copy method).

These operations will be called frequently, by many different users - all the actual operation occurs on a single server.

What would the pros and cons of each approach be? Are there any prefered or better optimized techniques available?

+3  A: 

Option 1:

Pro:

  • Speed

Contra:

  • The inserted Data can't be copied, altered, viewed within excel etc.

Option 3:

A couple of years ago I wrote a similar VBA-Procedure that created a >1000 Slides Presentation from an Excel Sheet. The method was called from Excel and went AFAIR like this(pseudo-code):

newSlide = PowerPoint.AddSlide
embeddedSheet = newSlide.Add OLEObject(Excel-Sheet)
embeddedSheet.Range(..., ...) = srcSheet.Range(..., ...)
someFormating(embeddedSheet)
createPieChart(embeddedSheet.Range(..,...))
resize(embeddedSheet)
embeddedSheet.Save
embeddedSheet.Close

Pro / Contra based on my experience with the method above.

Pro:

  • The Sheet is embedded in PowerPoint
    • you can alter the Data and run Macros on it.
    • you do not need to keep the original Excel sheet.

Contra:

  • The Output-File is bigger
  • The Process uses a lot of RAM.
  • The Process takes relatively long. AFAIR 1k Slides took about 10 Minutes on the computer in my office. Creating the OleObject took the majority of the time.
marg