Excel Version 2310 breaks CTP and some ribbon loading in Excel-DNA add-ins

297 views
Skip to first unread message

Govert van Drimmelen

unread,
Oct 27, 2023, 4:58:55 PM10/27/23
to Excel-DNA
Excel Version 2310, which was released on the Current Channel on 26/10/2023, contains changes to the COM add-in loading implementation which impacts some Excel-DNA add-ins.

The most serious problem affects any Custom Task Pane (CTP) loaded from an add-in with the standard Excel-DNA mechanism using the `CustomTaskPaneFactory.CreateCustomTaskPane` helper call. Under affected Excel versions, the CTP will not be displayed.
If the Excel option to "Show add-in user interface errors" is enabled, the internal NullReferenceException will be presented with a message box indicating that an exception occurred, containing the message "Object reference not set to an instance of an object."

The problem also affects the loading of ribbon UI extensions, but only in some scenarios. 

The ribbon extension will _not_ load in the following cases:
* Double-clicking on the .xll to load it in Excel.
* Loading the add-in from the command-line (the case when debugging an Excel-DNA project from Visual Studio)
* Initially when installing the add-in in the Excel add-ins list.

However, the ribbon extension does load successfully in some cases:
* Starting Excel with a previously installed add-in that loads on startup.
* The add-in is loaded because it is placed in the designated XLSTART folder.
* The add-in is reloaded a second time into the Excel process with File -> Open.

The problem was first reported at the beginning of October when found in the beta version of Excel and tracked in this GitHub issue: The ribbon is no longer loaded since today's Excel Beta Version 2310 Build 16924.20002. · Issue #642 · Excel-DNA/ExcelDna (github.com) I've provided a bit more details on the problem in posts to that issue.

It looks like we have a reasonable workaround which has been implemented in the latest pre-release version of Excel-DNA v1.7.0-rc9. Add-in projects will have to upgrade to this version or later to avoid the above problems. This is a stable version and I plan to make a final release of v1.7.0 in the coming week or two, barring any new problems. I am happy to help with any problems you run into when updating to the new version, through the Google group, or direct support options.

If your add-in is affected by this problem, please also use the "Send a Frown" feedback mechanism (or any other channel you may have access to) to report the problem to Microsoft. 

-Govert

--------------------------------------------------
Did you know that Excel-DNA is registered on 
GitHub Sponsors?
Your monthly support encourages ongoing support, funds further development and keeps us open source.
-------------------------------------------------- 




Govert van Drimmelen

unread,
Oct 31, 2023, 4:27:52 AM10/31/23
to Excel-DNA
The problem was present in the initial release of Excel Version 2310 to the Current Channel - Build 16.0.16924.20054.
After doing an Update Now, the problem is not present in Version 2310 Build 16.0.16924.20124.

It looks like Microsoft have reverted the changes which caused this problem.

-Govert

Reply all
Reply to author
Forward
0 new messages