Hello Óscar Broullón Sotelo,
Thanks for reaching out!
As per the documentation, Error "InvalidArgument" usually occurs if the argument is invalid, missing or has an incorrect format. I am able to repro the issue after putting invalid Sheet Name in the request body.
You can use the workbook functions in Excel with Microsoft Graph to invoke any workbook function by using the following syntax: POST /me/drive/root/workbook/functions/{function-name}. Please refer to the documentation for more details.
I am able to use the function CountA using Microsoft Graph API. Please refer to the below screenshot:
To use the function CountA with Microsoft Graph API, please refer to the below endpoint:
POST https://graph.microsoft.com/v1.0/me/drive/root:/book1.xlsx:/workbook/functions/counta
{
"values": [
{
"address": "Sheet1!D1:D4"
}
]
}
For a complete list of supported functions, see Excel.Functions class.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".