dallen16 has asked for the wisdom of the Perl Monks concerning the following question:
Has anyone been able to write Perl scripts with Win32::OLE that create well formatted, non-trivial spreadsheets using OpenOffice.org or derivatives such as Lotus Symphony 3? ... or by any other means?
I have years of experience creating "all sorts" of complex MS Excel spreadsheets using ActiveState Perl, Win32::OLE and the MS Excel object model. I've been "challenged" to migrate some of this work to OpenOffice 3.x. My initial impression is that it's much more complicated with OpenOffice than with MS Excel. And even some of the basics don't seem to work... like setting the visible / hidden parameter on file open call as such... (or maybe I'm just being dense). Conversely, setting Excel to invisible is commonplace and trivial.
Anyone want to collaborate on developing and posting non-trivial Perl scripts that create and manipulate OpenOffice spreadsheets?
use strict; use warnings; use Win32::OLE; use Win32::OLE::Variant; use Win32::OLE::Const; Win32::OLE->Option(Warn => 3); # Turn on warnings for easier debugging my $objServiceManager = Win32::OLE->new("com.sun.star.ServiceManager") + || die "CreateObject: $!"; # create a new process my $desktop = $objServiceManager->createInstance("com.sun.star.frame.D +esktop"); my @propValue = (); $propValue[0] = $objServiceManager->Bridge_GetStruct("com.sun.star.bea +ns.PropertyValue"); $propValue[0]->{Name} = 'Hidden'; # This does not work! $propValue[0]->{Value} = 1; my $calc = $desktop->loadComponentfromUrl("file:///C:/My Documents/Sum +mary-20101031.ods", "MyCalc", 0, \@propValue );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OpenOffice Calc/Spreadsheets & Win32::OLE
by bluescreen (Friar) on Nov 01, 2010 at 22:21 UTC | |
by dallen16 (Sexton) on Nov 02, 2010 at 01:24 UTC | |
by jmcnamara (Monsignor) on Nov 02, 2010 at 09:46 UTC | |
by choroba (Cardinal) on Nov 02, 2010 at 08:52 UTC | |
|
Re: OpenOffice Calc/Spreadsheets & Win32::OLE
by Sinistral (Monsignor) on Nov 02, 2010 at 12:38 UTC | |
|
Re: OpenOffice Calc/Spreadsheets & Win32::OLE
by locked_user sundialsvc4 (Abbot) on Nov 02, 2010 at 12:52 UTC | |
|
Re: OpenOffice Calc/Spreadsheets & Win32::OLE
by thargas (Deacon) on Nov 02, 2010 at 13:33 UTC | |
|
Re: OpenOffice Calc/Spreadsheets & Win32::OLE
by angiehope (Pilgrim) on Nov 02, 2010 at 13:19 UTC | |
|
Re: OpenOffice Calc/Spreadsheets & Win32::OLE
by starrychloe (Initiate) on Jun 24, 2013 at 21:41 UTC |