Open gmichaud opened 2 weeks ago
I have updated the bug description above with the updated sample
Here's an updated set of test macros:
ExcelAutomationCustomFunctionsAdditionalScripts.zip
I have also simplified the test workbook down to a single custom function
I inspected the side-panel console and our telemetry and we don't see anything being logged, so assuming function registration is not yet completed at this stage. It sometimes happen that Excel triggers a recalculation on file open; if custom functions are involved, the #VALUE! error will be shown to user as well. Users can then manually force a recalculation, but it looks like a bug to them.
I think Excel should defer calculation or keep waiting until the add-in has been fully initialized in these scenarios.
Hi @gmichaud Thanks for reporting this issue, we'll take a look and report back if we have a suggestion for you.
Your Environment
Expected behavior
Files opened via COM automation work seamlessly.
Current behavior
NAME! error shows up for all the custom formulas, even though side panel loads and ribbon is initialized. You can tweak initialization a bit by changing the order of operations and get custom functions to work, however if there's anything that triggers a recalculation during file opening then #VALUE! error will be displayed.
Steps to reproduce
Unzip attached archive ExcelAutomationCustomFunctionsAdditionalScripts.zip
Edit VBScript file extract in step 1 to change path to SampleWorkbookUsingCustomFunctions.xlsx file also included in ZIP file
Open workbook manually, and confirm that the =VELIXOVERSION() and other =SI... custom functions show up fine when entering them in a cell
I inspected the side-panel console and our telemetry and we don't see anything being logged, so assuming function registration is not yet completed at this stage. It sometimes happen that Excel triggers a recalculation on file open; if custom functions are involved, the #VALUE! error will be shown to user as well. Users can then manually force a recalculation, but it looks like a bug to them.
I think Excel should defer calculation or keep waiting until the add-in has been fully initialized in these scenarios.
Link to live example(s)
Recording: https://www.loom.com/share/2db0848bfc8543d98195890b0332afe1
Context
We initially discovered this issue when trying to use a .NET app that uses Excel COM automation to automate Excel (it opens files and sets a named range to a value), but to simplify troubleshooting we have been able to narrow this down to a simple scenario involving VBScript.
Useful logs
Console doesn't show any error message.