Krzysztof Stanisławek
Krzysztof Stanisławek

Reputation: 1277

Editing `ods` file in C++ code

I need to edit LibreOffice Calc document programmatically in C++. I know that there is odfkit library, which uses webodf, but it looks like it doesn't support editing .ods files.

Is there any alternative that can deliver me this feature?

Upvotes: 2

Views: 4183

Answers (2)

Jan Hudec
Jan Hudec

Reputation: 76346

Libreoffice has API, called UNO, for controlling it from another process. So if you need something more complicated, that would be the simplest route.

If you just need some simple transformation, the other option is to unpack the file with plain old zip library (libzip, libarchive, ...) and modify the XML manually.

The opendocument site also mentions lpOD, but the web seems defunct and while search comes up with something that looks relevant, I am not sure whether there is anything usable.

Upvotes: 3

ngulam
ngulam

Reputation: 1075

see the SDK documentation, with many examples

Upvotes: 1

Related Questions