Problems with Excel functions using Openxlsx2

Hello everybody,

I’ve encountered a problem during working with library Openxlsx2 in R.

wb$add_formula(sheet = "Sheet1",  x= "BETA.INV(RAND(), $G$16, $H$16)" , dims = "C16")

For some reason it creates in Excel this formula:

=@BETA.INV(RAND(), $G$16, $H$16)

and it doesn’t work, in a cell I only see “#NAME”, but when I delete “@” from formula it works perfectly fine. Do you know what can be the problem?

Hi @Arnalt , have you tried BETAINV() function instead? It is an older excel function.
I had the same problems with XLOOKUP() and some other functions and when I changed them to older versions (XLOOKUP to VLOOKUP) it worked fine. Maybe openxlsx2 has a problem with the newer excel functions :thinking:

Oh, I see. It makes sense. Thank you @Anna_Wieczorek :smiley:

1 Like