recalculate wit command line option -convert-to


I have a spreadsheet file which I would like to convert into a pdf file with the following command:

soffice --headless --convert-to pdf workbook.ods

Until now I had simple formulas that have been automatically recalculated during the convert-to process, so that the pdf contained all updated data and everything was fine.

Now, I needed to enhance the functionality in my workbook and I have a fomula, that uses data from another workbook (dataframe.ods) in the same folder.

So I have a formula in my workbook.ods like ='file:///Users/dataframe.ods'#$Table1.A1
When I open the workbook.ods with my LibreOffice application the sheet is recalculated automatically.

But when I use the command line conversion -convert-to pdf this is not the case. In the pdf output all external data references are displayed with the value that were stored when the Ods was saved.

I would be thankful for any hints on solving this issue.

I already did the following changes in LibreOffice Preferences:

  1. Security/Marcos Security: low
  2. LibreOffice Calc/Formula/Recalculation on File Load/Excel 2007 and newer: Always recalculate
  3. LibreOffice Calc/Formula/Recalculation on File Load/ODF: Always recalculate

I use LibeOffice and the conversion job is initiated by my python web application.