On Fri, 12 Sep 2008 09:56:44 -0500, Greg Lindstrom <[EMAIL PROTECTED]> wrote:

Hello Everyone,

I have developed an application where I work which creates a Microsoft Excel spreadsheet and now would like to create an Open Source version to release
to the community.  The application makes use of the Python programming
language (www.python.org). I have located the UNO Python page and the odfpy
but the odfpy documentation is confusing to me.  The example in the back
shows how to create a new spreadsheet (easy!) and how to read in an existing spreadsheet (easy) but not how to manipulate an existing spreadsheet. Can
someone help me out with the following?

1. After opening the speadsheet, how can I access a list of the individual
sheets (that is, the 'tab' names) and how many tabs there are?

2.  How can I retrieve the contents of a particular cell on a particular
sheet (for example, the contents of cell A1 on 'sheet 1'?

3.  How can I set a specific cell value (place "hello world" in call B2)?

If it helps/matters, I'm running Python 2.5 on Ubunto.

Thanks!
--greg

You need to dip yourself on the api. I will ask at [EMAIL PROTECTED] or [EMAIL PROTECTED] for more access to UNO experts.

There are functions in the spreadsheet such as SelectPageByIndex() and getPositionByName() that might help you. Also take a look at working with spreadsheet on the OpenOffice.org wiki.

http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Editing_Spreadsheet_Documents

odfpy is a framework that doesnt really use UNO, is independent of OpenOffice.org so you will use the standard XML library (PyXML) to generate the ODF schema and the Zip module to package it.

To use python from within OOo you need some lines of code to connect to OOo, use UNO, and use their functions.

This page has some samples of python scripts working with OOo:
http://udk.openoffice.org/python/python-bridge.html#examples

--
Alexandro Colorado
CoLeader of OpenOffice.org ES
http://es.openoffice.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to