Excel 2007 Error due to XLL Module Size

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

Excel 2007 Error due to XLL Module Size
Excel fires exceptions with XLL modules with "too many" functions 
NAZIM OSMANCIK




Posts: 9
Joined: 2008-10-07
Dear Support Officer,

I am using the ADX 2008 for MS Office and .net together with MS visual studio standard edition 2008.

I have been trying to develop an XLL add-in for MS Excel 2007 which works fine, however, Excel 2007 started firing an exception when the project is registered. I found out by experimenting that this is due to too many functions declared within the XLL module (similar problem arises in Excel VBA).

So, I added another XLL module, but somehow the functions do not register to Excel. I thought there could be a limit on the total number of functions that can be declared within the whole visual studio project but I tried creating a new project with two XLL modules and declared one public shared function in each.

The function within the main XLL module that is automatically created when an XLL project is created registers within Excel. However, the function within the other XLL module does not register.

What do I need to do to make the functions within all the modules visible to Excel? Your help is appreciated.
Posted 07 Oct, 2008 08:48:03 Top
Eugene Astafiev


Guest


Hello Nazim,

You can define up to 512 functions per a XLL add-in.

Please read the "How to Develop the Modular Architecture of your COM and XLL Add-in?" section in the documentation.

Posted 07 Oct, 2008 09:11:05 Top
NAZIM OSMANCIK




Posts: 9
Joined: 2008-10-07
Hello Eugene,

Thank you for your response. So, just to clarify - can I define up to 512 functions per an XLL add-in project or an XLL module?

A related question - I have a problem with registering functions when I have two XLL modules within an XLL project. I tried building a test XLL project with two modules with one function in each. When I register the ADX project, the function that is within the original XLL module appears in MS Excel 2007. The function that is in the other XLL module does not appear in there however. Does this mean that I can use only one XLL module per XLL project?

I tried using the XLLAdditionalModule to get around it but could not manage to register the functions declared within that module either.

Could you please provide a little more guidance? Thank you so much.
Posted 07 Oct, 2008 11:03:32 Top
Eugene Astafiev


Guest


Nazim,

You can define up to 512 functions per a XLL add-in.

Just add an additional XLL module to the Modules collection of the main XLL module.
Posted 07 Oct, 2008 15:48:17 Top