Excel Object in XLL AddIn

Add-in Express™ Support Service
That's what is more important than anything else

Excel Object in XLL AddIn
Using Excel Object Model with XLL 
Michael Kaden

Posts: 164
Joined: 2017-11-15

I understand from ADX documentation one cannot use the Excel Object Model within an ADX XLL AddInn.

I have now done the following

Created an ADX XLL

Created a UDF within the XLL Container

Created a new class outside of the XLL Module

Created a Function in the new class

The UDF passes caller information (workbook.Fullname / sheet.Name / cell.address as string) to the new function

the new function uses the getObject(Workbook.FullName) to link to the calling workbook/worksheet/cell

The new function does for example:

Add up 2 offset cells from the caller cell and returns this to the UDF as result.


Set the Workbook calculation mode to Excel.XlCalculation.xlCalculationManual


read or writes to Workbook.CustomDocumentProperties

all this works perfect.

is this normal and did I misunderstand the quote that ADX XLL AddIn cannot use Excel Objects?

ps I registered my project for COM Interop


Posted 29 Nov, 2017 10:51:38 Top
Andrei Smolin

Add-in Express team

Posts: 15595
Joined: 2006-05-11

You do this on your risk. The Excel SDK doesn't promise to support a call to the Excel object model when your XLL function is called.

To be absolutely precise, I need to provide this piece of knowledge: they removed a page that explicitly explained why you cannot issue an object model call from your XLL. I don't know when this occured. You can find the URL of that page is mentioned in the Add-in Express manual; see section Using the Excel Object Model in an XLL. I don't know if this means that they allow object model calls. I'm pretty sure, though, they could not allow such calls in older Excel versions.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Nov, 2017 11:11:21 Top