Convert xlsx with several sheets to pdf

Hello OnlyOffice team!

Subject: API Conversion Issue: Complex cross-sheet INDIRECT/ADDRESS formulas result in #VALUE! error (Desktop Editor works correctly)

Environment: onlyoffice/documentserver:9.2.1 (deployed via Docker)

Issue Description:
I am sending an .xlsx file to the Conversion API to convert it to PDF. The file consists of two sheets. The first sheet contains columns with formulas that reference specific cells on the second sheet. Visually, the referenced cells on the second sheet appear empty.
If I inspect the underlying XML structure of the file:

  1. In the XML of the second sheet, there are no values for these cells.
  2. In the XML of the first sheet, the formulas and their cached calculated values are present. For example:
<c r="G9" s="42" t="n">
  <f aca="false">I9</f>
  <v>6749494.95</v>
</c>
<c r="H9" s="43" t="n">
  <v>6682000</v>
</c>
<c r="I9" s="44" t="n">
  <f aca="true">IF(AND(INDIRECT(ADDRESS(ROW()+1,COLUMN(A:A),1,1))="result:",INDIRECT(ADDRESS(ROW()-1,COLUMN(A:A),1,1))="№ п/п"), IF(AND($H$7<>"",$I$7<>""),"error", IF($H$7<>"",ROUND($H$9/(1-$H$7/100),2), H9+$I$7) ), IF(INDIRECT(ADDRESS(ROW()+1,COLUMN(A:A),1,1))="ИТОГО:", IF(AND($H$7<>"",$I$7<>""),"error",IF(AND($H$7="",$I$7=""),H9, IF($H$7<>"",ROUND(INDIRECT(ADDRESS(ROW()+1,COLUMN(H:H),1,1))/(1-$H$7/100),2)-SUM($I$9:INDIRECT(ADDRESS(ROW()-1,COLUMN(I:I),1,1))), INDIRECT(ADDRESS(ROW()+1,COLUMN(H:H),1,1))+$I$7-SUM($I$9:INDIRECT(ADDRESS(ROW()-1,COLUMN(I:I),1,1)))))), IF(AND($H$7<>"",$I$7<>""),"error",IF(AND($H$7="",$I$7=""),H9, IF($H$7<>"",ROUND(H9/(1-$H$7/100),2), H9+ROUND($I$7/$H$34*H9,2))))))</f>
  <v>6749494.95</v>
</c>

(Where 6749494.95 is the expected calculated value).

The Problem: After conversion via the API, these cells display #VALUE! errors instead of the calculated numbers. However, if I open the exact same file in the OnlyOffice Desktop Editor and export it to PDF, the calculations are performed correctly, and the output is perfect. (In both cases, the resulting PDF contains only the first sheet, but the API version fails to calculate the values).

Attempted Solutions: I have tried various settings using the spreadsheetLayout parameter in the API request, but none of them seem to help.

Questions:

  1. Is there a specific API setting or parameter that forces the Document Server to fully recalculate all formulas (including complex INDIRECT/ADDRESS cross-sheet references) before converting the file?
  2. Could this be a bug related to how the headless conversion engine handles cached values or volatile functions like INDIRECT?

Thank you in advance for your help!

Hello! Thank you for the detailed description.

Since the same file is processed correctly in ONLYOFFICE Desktop Editors but produces #VALUE! errors when converted by Document Server 9.2.1, we need to investigate this behavior further.

Please update ONLYOFFICE Docs to the latest available version and re-check the issue. If it persists, please provide:

  • The original .xlsx file with which the issue can be reproduced. If it contains confidential data, please provide a minimized sample that retains the same formulas and sheet structure.
  • The complete Conversion API request body and the response received from /converter (please remove tokens, passwords, and private URLs).
  • A short video or screenshots showing the result in Desktop Editors and the PDF produced through the Conversion API.

Once we receive these details, we will reproduce the issue and check whether it is related to formula recalculation during headless conversion.