Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Convert to M$FT formats with OpenOffice::OODoc?

by Your Mother (Chancellor)
on Feb 16, 2009 at 18:47 UTC ( #744173=perlquestion: print w/replies, xml ) Need Help??
Your Mother has asked for the wisdom of the Perl Monks concerning the following question:

I Googled around and found a decent example of creating Impress (the OpenOffice version of Powerpoint) files with OpenOffice::OODoc. What I can't seem to find or intuit from the code and docs is how to convert to Powerpoint. My conclusion is that it's not possible. I would love to be shown to be wrong.

Please someone tell me I'm wrong and there is some equivalent of the brilliant Spreadsheet::WriteExcel for Powerpoint which runs in *nix environments. So, OLE need not apply. :(

Though not a need this second, I'd love to be able to convert from .swx and friends to .doc too.

If this isn't directly possible in Perl-

1) Anyone have robust system level tricks for getting it from one to the other?

2) Preferred/possible way of doing Powerpoints from Perl? From template/xml? Any snippets, links, suggestions appreciated. Thanks as always!

  • Comment on Convert to M$FT formats with OpenOffice::OODoc?

Replies are listed 'Best First'.
Re: Convert to M$FT formats with OpenOffice::OODoc?
by Anonymous Monk on Feb 16, 2009 at 19:49 UTC

      Very nice. I even looked at that page already but didn't glean the right message. Thanks!

Re: Convert to M$FT formats with OpenOffice::OODoc?
by gnosti (Hermit) on Feb 17, 2009 at 06:45 UTC
    It may be worth investigating Ooconvert, a command-line utility.
Re: Convert to M$FT formats with OpenOffice::OODoc?
by ~~David~~ (Hermit) on Feb 17, 2009 at 23:17 UTC
    Here is some old code snippets for making PPT files:
    # Create PowerPoint OLE server. my $ppt = Win32::OLE->new( 'PowerPoint.Application', 'Quit' )or die "C +an't create PowerPoint OLE: $!\n"; $ppt->{Visible} = 1; my $pres = $ppt->Presentations->Add(); ####### SLIDE #1: INSPECTION NAME $Slide = $pres->Slides ->Add({Index=>"$slideIndex" , Layout=>ppLay +outTitle}); $Title=$Slide->Shapes->{Title}; $Title->TextFrame->TextRange->{Text} ="INSP $level Inspection"; #$SubTitle= $Slide->Shapes->Placeholders(2)->Delete; #$SubTitle->TextFrame->TextRange->{Text} ="INSP Comments\:"; ####### SLIDE #2: SPC CHARTS $spc_img = "$path\\charts\\INSP\\"."$level"."\.jpg"; $slideIndex++; $Slide = $pres->Slides ->Add({Index=>"$slideIndex" , Layout=>ppLay +outTitleOnly}); $Title=$Slide->Shapes->{Title}; $Title->TextFrame->TextRange->{Text} ="$level SPC Charts"; $picture_spc = $Slide->Shapes->AddPicture({ FileName => "$spc_img", LinkToFile => 0, SaveWithDocument => 1, Left =>0, Top => 55, Width => 720, Height => 450 }); $TextBox=$Slide->Shapes->AddTextbox({Orientation=>1, Left=>50, Top=>500, Width=>650, Height=>30}); $TextBox->TextFrame->TextRange->{Text} ="Trend Comments:"; $WeekBox = $Slide->Shapes->AddShape({Type => '1', Left=>600, Top=>87, Width=>100, Height=>385}); $WeekBox->Fill->ForeColor->{RGB} = (RGB(0,0,255)); $WeekBox->Fill->{Transparency} = (0.8); $WeekBox->Line->{Weight} = (2.25);

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://744173]
Approved by Narveson
Front-paged by MidLifeXis
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2017-08-20 10:16 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (313 votes). Check out past polls.