scripting gnumeric



Hi!

I'm interested in the ability to have a python script drive gnumeric.
I believe this would be similar to the plugin capability, but somewhat
different.  I'd like to do something like:

        gnumeric --script transform.py data.gnumeric

Basically, this would load data.gnumeric, then run the script
transform.py.  In transform.py, I would need to get some data
out of the data file, add some external data into the spreadsheet,
save, print, quit.

Ideally, I don't even need the gui to come up.  I only need gnumeric's
ability to read/write gnumeric, xls, and pdf files.

Any ideas how hard this would be?  Pointers on what would need to
be changed?  Guestimate on how long it would take to make the changes.
I'm not familiar with the gnumeric code or gnome apis.  I'm very
familiar with C and python internals.

Here are more details that may or may not be relevant.  Specifically
what I want/need to do are:

        * on a monthly basis, run a python script to generate the
          hours worked for each employee for each project
        * enter those hours into a spreadsheet to maintain
          cumulative hours, calculate the cost 
          (hours * rate in spreadsheet)
        * generate an invoice to multiple customers (one per project)
        * save and print the invoice (PDF)

Another possible solution I've thought of is to use a script which
communicates to gnumeric through ORBit to get values from the
spreadsheet, update the values, save, print, etc.  I haven't found
any info on this is possible or how to do it (but I haven't looked
real hard at this option either).

I can modify the code, but right now I don't have all the dependencies
setup to build gnumeric.  I think gtk+ is too old (Redhat 9).
I'm a python committer.  I know the python C source well.

Happy Holidays!

Thanks,
Neal



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]