shaggyquest has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I am new to this group, and also to perl. I struck at a point at which I have to copy an existing Excel sheets in to Powerpoints(Each excel sheet and charts in each slide) and also name the title the slides accordingly to Excel Sheet and chart name.

Replies are listed 'Best First'.
Re: Use of Powerpoint and Excel?
by marto (Cardinal) on Apr 23, 2008 at 15:21 UTC
      My code: $book = $xlapp->Workbooks->Open("$file"); $chart = $book->Charts(3)->Copy(); $ppt = $power->Presentations->Add(); $ppt->Slides->Paste($chart); $ppt->SaveAs($filename.'\shashimamidi'.'.ppt'); In this code I couldn't copy the Excel Chart to 'ppt'... Is there any way that I can copy and paste in MS Powerpoint? Shaggy
Re: Use of Powerpoint and Excel?
by nbartusi (Scribe) on Apr 23, 2008 at 20:45 UTC
    A common 'trick' to develop new Win32::OLE code is to create a VB macro then convert that to perl. In this case it sounds like you would need 2 macros, one in Excel to copy the object to the Windows Clipboard and the other in Powerpoint to paste from the Clipboard.