Python + OpenOffice Calc

rantingrick rantingrick at gmail.com
Wed Mar 31 23:53:08 EDT 2010


On Mar 31, 2:47 am, Tracubik <affdfsdfds... at b.com> wrote:
> 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


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?

If the guy is that scared of spreadsheets I would skip the spreadsheet
all together and just use a Tk.Listbox to display the data. Create a
big button at the bottom (preferably in Times 20 red font) that says
"NEW INPUT" and let him edit lines by double clicking on them. You
need a good Scrolled Listbox with a nice interface, an entry dialog,
and some file IO with backup protection. Thats about it.

I would probably create a new file every day, week, or month depending
on the amount of data he enters daily, you don't want to load enormous
files into a Tk.Listbox. 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!

If you want to do this and need help i would be happy to offer my
assistance. This would be a "fairly" simple script and great learning
experience for you.



More information about the Python-list mailing list