Detlef Hüttemann wrote:
Is the only way to do it the -headless approach? Or can I use some software components as a library in my own application?
Hi Detlef, so perhaps the LibreOfficeKit approach would suit your usecase - it's a reasonably smallish C/C++ API around a fully headless LibreOffice, currently used in some document viewers, and also for LibreOffice Online. It already provides functions to initialize, load, and process documents - adding another callback under the LOK_USE_UNSTABLE_API section in include/LibreOfficeKit/LibreOfficeKit.hxx shouldn't be too hard, see e.g. commit 1a74c6333a79ccf0579b33ebc42ce2ccc23ccadb for a smallish example of how to get something out of the LibreOffice core. Example code how to retrieve a cell's value: in sc/qa/unit/functions_test.cxx, the FunctionsTest::load() - * DoHardRecalc() * GetDocument().GetValue(col,row,sheet,out_val) For something enterprise-ready, you'd probably want to run LibreOffice in a separate process or something, to keep it at arm's length from your webserver & php interpreter. HTH, -- Thorsten
Attachment:
signature.asc
Description: Digital signature