Closed wh1t3cAt1k closed 7 months ago
Hi @wh1t3cAt1k , if the argument is simultaneously repeating, number, and optional: false, will the custom functions fail to install? If it will, I think this may cause by repeating parameters by default is optional and cannot change to not optional. Otherwise, we don't know how many repetitions are appropriate.
If it won't, It should be a bug.
@JHJ-MS it's quite clear in my view, that the behaviour should be the same as we have in the COM-based add-in: Excel would check that at least the first of the repeating arguments is specified (and display it as non-optional in Intellisense), and the rest of repetitions are displayed as optional.
Argument1, [Argument2], ...
I can check the number case later today
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
Still relevant
@JinghuiMS @JHJ-MS the bug reproduces even for non-matrix arguments, so I will reformulate the bug title.
{
"functions": [
{
"description": "Returns 42",
"id": "ANSWER",
"name": "ANSWER",
"options": {
"requiresAddress": true
},
"parameters": [
{
"description": "Repeating argument.",
"name": "Argument",
"repeating": true,
"type": "number",
"optional": false
}
],
"result": {
"type": "number"
}
}
]
}
Result:
Expected result:
The behaviour should be the same as we have in the COM-based add-in: Excel would check that at least the first of the repeating arguments is specified (and display it as non-optional in Intellisense), and the rest of repetitions are displayed as optional.
Argument1, [Argument2], ...
Hi @wh1t3cAt1k, the non-optional repeating parameter is not supported for Custom Functions now. To achieve your goal, you can append an additional non-optional argument. Besides, you can go to Microsoft 365 Developer Platform Ideas Forum to request a new feature. Thanks for your reporting again.
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.
@JHJ-MS @JinghuiMS @RuizhiSunMS @Wenjun-Gong please reopen this. The workaround proposed (adding another argument) is not working for us because we need to maintain 100% function-level compatibility with our legacy XLL add-in.
If an argument is simultaneously repeating, matrix and optional: false, add-in fails to install the custom functions.
Your Environment
Expected behavior
Current behavior
Add-in fails to install the custom functions altogether. There is no reasonable troubleshooting message for developer
(BTW, the latter is a related general problem for us, could we also ask to direct those errors into the console so we could understand what was the offending function? It takes a lot of trial-and-error to understand what caused the functions to suddenly top loading)
Steps to reproduce
dist/functions.json
, add an explicitoptional: false
to the argument definition.Context
Cannot achieve consistency with our legacy COM-based add-in, migration to the modern framework hampered by this issue.