LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Using OpenOffice source to render data for charts into images ? (https://www.linuxquestions.org/questions/programming-9/using-openoffice-source-to-render-data-for-charts-into-images-522453/)

WhiskeyTangoFoxtrot 01-24-2007 02:02 PM

Using OpenOffice source to render data for charts into images ?
 
G'day,
i am working on a program that would allow me to take an XML file containing an OpenDocument spreadsheet and graph and output the graph directly into an image. i figured using the libraries included in openoffice would make most sense and be time saving as well. does any one have any ideas on OOo source and what i would need to put together such an app ?
thanks.

b0uncer 01-25-2007 08:58 AM

Well one way would be to use the "macros" OO provides (it has a somewhat similar macro system than MS Office has with it's VB code), to automatically open the file, take the chart and produce an image out of it if OO is capable of doing it in the first place. Though this would mean launching the OO app itself, so I'm not sure if you want that.

jlliagre 01-25-2007 09:19 AM

Have a look there too for embedding OpenOffice.org in your application: http://api.openoffice.org/Developers...persGuide.html

WhiskeyTangoFoxtrot 01-25-2007 09:57 AM

ok........im getting a hold of the SDK. going over the developers guide as well, it all looks like greek to me :s

thanks anyways.

jlinkels 01-26-2007 05:25 AM

Steering someone away from a once chosen direction might not be the smartest thing to do, but anyways...

I have serious problems with openoffice, especially oocalc. Graphing in oocalc is troublesome, and sometimes impossible. (I am preparing another post on that, but I need to document it well)

Secondly I have been using oocalc in command line mode to extract and export data. With each new version (1.1 -> 1.1.3 -> 2.0) it seemed that bugs were introduced which limited the use of oocalc in batch mode. I posted something about this on the oooforum.org:

http://www.oooforum.org/forum/viewto...linkels#202095

http://www.oooforum.org/forum/viewto...linkels#178093

If anything, I would go for GNUPlot. It is easier to learn that oo macro language, and it is 2 orders of magnitude faster.

If you decide to stick with oo, I only can advise to limit yourself to data export as CSV (there is ample documentation around about that on ooforum.org, except that it seems to be broken in oocalc 2.0), use AWK for preprocessing, and use GNUPlot to create the graph.


All times are GMT -5. The time now is 05:30 AM.