I want to make a macro inspired by the Currency conversion sample (Currency conversion | ONLYOFFICE).
So i tried it but it doesn’t work with the new 9.3.1.8 version (with an older one, it worked but i don’t remember which version it was. Maybe 9.2.XX)
The macro throw an error in the reloadCellValues function (Api.asc_calculate is not a function).
Can anyone help me?
Thank you.
OS version: Linux Ubuntu 25.04
App version: 9.3.1.8
Downloaded from: .deb from the site and install as recommended
Additional information:
In the devtools console we can see the error…
Hello, thank you for your report and for the details you have already shared!
We are already checking this behavior on our side.
To help us localize the issue more precisely, please also send us the exact macro code you wrote and are currently testing. This will help us compare your real scenario with the official sample and investigate the problem faster.
Best regards.
Hello @nclement !
Thank you for your report and for sharing the macro code!
We have checked the situation: undocumented methods are no longer available for use in macros, so Api.asc_calculate(…) should not be used in this scenario.
Please use the documented method Api.RecalculateAllFormulas() instead.
Please try this method and let us know whether everything works correctly in your case.
The current macro sample page will be corrected as well.
With RecalculateAllFormulas i don’t have the error anymore.
But now, i have to refresh the sheet by pressing F9 to see the updated data.
They do not recharge automatically. Maybe because i don’t use formulas, juste simple additions, multiplications…
Hello, @nclement !
Thank you for the detailed checks and the update.
To reproduce your case as accurately as possible, could you please send:
The exact macro code that you are currently using (the full script).
The spreadsheet file where this macro is executed and where you see that values are updated only after pressing F9.
Once we have your macro code and a sample file, we will reproduce the scenario on our side and check what is causing the need for manual recalculation.