Hi everyone,
I need to create a BASIC macro with a function that returns if a given date is, or not, a workday. Actually my code looks like that :
Function myfWorkDay(ADate as Date, Holidays as Object) as String
Dim oService as Object
Set oService = CreateUnoService("com.sun.star.sheet.FunctionAccess")
myfWorkDay = oService.callFunction("WORKDAY", Array("2024-01-02", 0, Array("2024-01-01", "2024-05-01", "2024-05-08")))
End Function
The holidays object contains a cell range with all french holidays, but i hardcoded all the dates to test the function.
The call to “WORKDAY” function is not working, returning the “NoSuchElementException”. When I read the API reference, NETWORKDAYS and WORKDAY are in the same library. NETWORKINGDAYS works fine, but WORKDAY doesn’t want to.
Do you have any idea?
Thanks a lot.