Python and Open Office
peter.georgeson at gmail.com
Thu Sep 11 15:35:32 CEST 2008
On Sep 11, 7:04 am, "Colin J. Williams" <c... at ncf.ca> wrote:
> Marco Bizzarri wrote:
> > On Wed, Sep 10, 2008 at 10:04 PM, Greg Lindstrom <gslindst... at gmail.com> wrote:
> >> Hello,
> >> I would like to create and manipulate Open Office documents using Python. I
> >> have found then UNO Python page and odfpy modules which seem to be exactly
> >> what I need. The odfpy manual is, to me, a confusing list of objects and
> >> methods (it's an impressive list!), but does not have much in the way of how
> >> to use them. For example, I can open a spreadsheet and create new pages
> >> (there's a nice example near the back of the manual) but I can't figure out
> >> how to open an existing spreadsheet and list the names of the individual
> >> sheets ("tabs").
> >> I have written an application that access Microsoft Excel and creates
> >> reports for work, but would like to create an Open Source version using Open
> >> Office and release it to the community (and maybe get a talk at PyCon :-).
> >> Is there someone here who can help me out, or is there an appropriate
> >> mailing list for me to join?
> > Ciao, Greg.
> > you should check with the openoffice.org mailing list; I think what
> > you are looking for is the api mailing list for openoffice; you could
> > try to get the OpenOffice.org developers guide and the SDK, and check
> > it (but it is not a little work)
> > Regards
> > Marco
> >> Thanks
> >> --greg
> >> --
> If you follow this up, I hope that you
> will post info to c.l.p
> and let us know whether the UNO
> interface is Python 2.5 compatible.
> The last time I looked it was set for
> 2.3 or 2.4.
> Colin W
I've recently been working on interfacing with OpenOffice via UNO with
I can confirm that unfortunately, the PyUNO interface presently
(OpenOffice 2.4) is built with Python 2.3... so to use the UNO
interface from Python you have to write a separate script to run in
the OpenOffice Python 2.3 environment.
Apparently someone is working on rebuilding the PyUNO library for
Python 2.5 but there's no timeframe for when that might be included
with the OpenOffice distribution.
You could try building PyUNO with Python 2.5 yourself, I'm sure I came
across instructions somewhere on the OpenOffice developer website...
I've not used odfpy so don't know how it compares in terms of degree
of difficulty to UNO.
More information about the Python-list