This macro leads to #NAME? error because the EDATE name is not recognized as it is implemented as an AddIn function and the formula API for XCell::setFormula() for AddIns handles only the PODF programmatic names due to legacy reasons: > Sub Main > row=3 > ThisComponent.Sheets.getByIndex(0).getCellByPosition(3,row-1).setFormula("=EDATE($B"&(row)&";$C"&(row)&")") > End Sub Using the programmatic name com.sun.star.sheet.addin.Analysis.getEdate instead of EDATE works and yields the expected working =EDATE($B3;$C3) formula: > Sub Main > row=3 > ThisComponent.Sheets.getByIndex(0).getCellByPosition(3,row-1).setFormula("=com.sun.star.sheet.addin.Analysis.getEdate($B"&(row)&";$C"&(row)&")") > End Sub See also https://ask.libreoffice.org/t/macro-edate-in-setformula-goes-lowercase/76996 https://ask.libreoffice.org/t/macro-edate-in-setformula-goes-lowercase/76996/14
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/86ed0105a4d70d481e3358ae1c6855766ef44d23 Resolves: tdf#150253 Add English names for GRAM_API AddIn functions It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a56d0c34716f381accbd9d2e3040a62d3583d18d Add known but not in AddInMap English names for GRAM_API, tdf#150253 follow-up It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Pending review https://gerrit.libreoffice.org/c/core/+/137837 for 7-4
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/2f4e5b0b310a34a436998d8103c65e891ff2bff5 Resolves: tdf#150253 Add English names for GRAM_API AddIn functions It will be available in 7.4.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.