"Calling Calc Functions" help page [1] has an example for VLOOKUP, which passes the four arguments expected by the spreadsheet function using names that don't follow the names used in the VLOOKUP spreadsheet function help [2]: namely, [2] uses names "SearchCriterion", "Array", "Index", while [1] uses "item", "InRange", "FromCol" for the same. Non-English speakers will not recognize the semantical connection (which itself is poor). Of course, Array is itself a BASIC function name, so the used name should be similar but not identical; but the other names could be used as is. Specifically, the question arose on a Russian user forum [3]. Users do not necessarily draw connections between arguments to Array function, and arguments to the called spreadsheet function. (This itself could be explicitly mentioned, and maybe the reference to the service could have a link to api.libreoffice.org by the way.) [1] https://help.libreoffice.org/7.2/en-US/text/sbasic/shared/calc_functions.html?&DbPAR=BASIC [2] https://help.libreoffice.org/7.2/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3153152 [3] https://forumooo.ru/index.php/topic,8715.60/msg,59125.html
Olivier, could you please take a look.
I agree that the help page [1] will benefit from clearer argument names, as in the VLOOKUP page. I also have some ideas on how to improve the example. I'll work on this.
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/7d17a5cad38a5af3a8b776f5cad40e63cd2b5929 tdf#143585 Improve example on calling Calc functions in macros
This bug is now fixed in the latest build of the help: https://help.libreoffice.org/7.3/en-US/text/sbasic/shared/calc_functions.html?&DbPAR=BASIC