Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hello Davide,

With the right tools this works very fine actually. It took me some time to figure out which tool to use, but now I use the well designed and well working "Apache ODF Toolkit" here: https://incubator.apache.org/odftoolkit/ It's still in "incubating mode", but I didn't encounter any grave problems so far.

The ODF Toolkit is relatively small, pure Java bundle consisting of two parts: "ODFDOM" and "Simple API". The first one does the more complex low-level work, while the second ones makes it all very high-level for us normal users.

There's some fine examples on the Apache website, too, which should get you going in a short time. Basically you only need to use the Simple-API in order to open some Opendocument file (Writer, Calc, or the others), then you can insert, modify, delete cells, rows, culumns, paragraphs etc in your .odt or .ods file, and then save the result as file. It's a great tool.

The most recent version is 0.61 (summer 2014) but it needs some external JAR which I couldn't find so far, so I'm using version 0.5 (2013) which contains any needed JARs in one Zip file. Version 0.61's bug fixes and new futures aren't that critical for my purposes yet, but in case you would find out where to get the needed external JAR(s) for the 0.61 version, please tell so! Thanks.

P.S. Just in case your Java programs needs to export the resulting .odt or .ods file to a PDF file, too, I can only recommend to directly call from within Java the Libreoffice executable via Java's ProcessBuilder class, i.e. "libreoffice|soffice--convert-to pdf", but skip the UNO API which didn't work (for me).

Good luck and enjoy your Java programming!

Aurelius



Am 08.09.2015 um 00:44 schrieb Davide:
Hi,

I want to modify libreoffice calc (ods) files. I have seen that within the ods
(a zip file) there is content.xml file that contains values. I have tried to
change it
and I can change the calc. Sometime formula are not update because there are
"cached values" within the cell. Removing this values (xml attributes)
formula are
recalulated. Quite the same with charts.

Is this a good way or there are better ways? There is another "better way" to
make calc to
recalculate formula or redraw charts?
It better a library to do this? In case some raccomandation for java?

Thanks in advance for any help!

Davide


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.