Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Python + OpenOffice Calc

3 views
Skip to first unread message

Tracubik

unread,
Mar 31, 2010, 3:47:32 AM3/31/10
to
Hi all!
i'm giving away to a friend of mine that have a garage (he repair car) my
old computer. He will use it essentialy to create estimates of the work
via an ods file (i've made a simple ods file to be filled with the cost of
materials and a description of the work).
He's totally new with computer and have difficult to fill the ods file, so
i'ld like to create a simple python program that help him to introduce the
data in to the ods file via a simple gui.
So what i'm looking for is a way in python to insert data in a particular
cell of the ods file and possibly to save it and print it when it's full
filled with data.

the guy is similar to this:

3 fields: quantity - description of the piece bought - price

a way to add a new "line" if needed (for a new piece entry) similar to the
"add rule" in evolution

1 text field for the description of the work + 1 field for the price of
the work

and off course a way to insert this data in to the ods file via python

Any hints/tutorial/info?

thanks
Nico

Chris Rebert

unread,
Mar 31, 2010, 3:58:46 AM3/31/10
to pytho...@python.org

bobicanprogram

unread,
Mar 31, 2010, 4:21:16 PM3/31/10
to


OOcalc supports a little known feature whereby data can be
automatically sync'd between the spreadsheet and an HTML table. A
few years ago I did up a demo of this in action using Tcl/Tk (http://
www.icanprogram.com/hosug). It should not be too hard to port this
idea to Python.

bob

Message has been deleted

egl...@gmail.com

unread,
Apr 1, 2010, 5:38:44 AM4/1/10
to
On Apr 1, 6:53 am, rantingrick <rantingr...@gmail.com> wrote:

> > 3 fields: quantity - description of the piece bought - price
>

> So what is your plan...?
>   * Pop up a dialog with three entrys,
>   * have him fill out the three entrys,
>   * then have python insert the data into the spreadsheet?
> ...Why bother messing with OO, too much trouble for me?

Totally agree with you. No need for a heavy machinery in this case.

> Then just save all the data as csv and you
> can always load it into a spreadsheet later if the IRS comes knocking,
> or you need to print a professional looking spreadsheet ;-).  Simple,
> 100% python solution!

Actually, a spreadsheet based solution isn't best fit for such a task.
I'd recommend to store the data in sqlite3 (also 100% pure python as
the module is in the stdlib). CSV is good for making invoices or
something like that.

Message has been deleted
0 new messages