#Name Error Excel Functions

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

#Name Error Excel Functions
 
Matthias Thurner




Posts: 6
Joined: 2013-07-01
Hello,

we have a problem with a Excel-Add-in which use UDF. It seems that sometimes it works and sometimes not. We use .Net 2 and a Add-in-Express Version from 2010. If the Add-in not worked we deregister and register with admin-rights then it works for a while. We know that this issue happends with Excel in 62Bit Version and .Net 2 but how is that posibble that sometimes it works and sometimes not. Do you have a clue what is realy cause the Problem? Another odd fact is that it works with Excel 2010 in 64Bit on Windows 8 but with Excel 2013 doesn't.

Regards
Alex Martineau
Posted 01 Jul, 2013 04:42:04 Top
Andrei Smolin


Add-in Express team


Posts: 18787
Joined: 2006-05-11
Hello Alex,

This description lacks many details. In what way the add-in(s) doesn't work? Can you get a copy of adxloader.log after the add-in(s) appears not working? Also, am I correct assuming that it may work and not work on the same machine?


Andrei Smolin
Add-in Express Team Leader
Posted 01 Jul, 2013 07:13:58 Top
Matthias Thurner




Posts: 6
Joined: 2013-07-01
Hello Andrei,

the Add-In it self work but not the User-Defiend-Functions (UDF) ist appears #Name in the cell which use a function. Yes sometimes it works sometimes not it's kind of magic ;)

adxloader:

Startup directory: C:\Program Files (x86)\prevero-Client\addin2\
Loader version: 6.5.3057.0
Operating System: Microsoft Windows 7 Professional Service Pack 1 (build 7601), 64-bit
Process Owner: User
Command Line: "C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE"
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): Off
------------------------------------------------------------------------
08:33:30 2516 3048 Start.
08:33:30 2516 3048 Reading the registry key 'HKEY_CLASSES_ROOT\CLSID\{641F548D-2D88-4286-8647-71A55D36DD22}'
08:33:30 2516 3048 Success. The registry key 'HKEY_CLASSES_ROOT\CLSID\{641F548D-2D88-4286-8647-71A55D36DD22}' is closed.
08:33:30 2516 3048 Converting the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID from string.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Attempting to get the class object by the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Creating a new instance of the add-in loader.
08:33:30 2516 3048 Loading mscoree.dll
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Loading the configuration from the system registry.
08:33:30 2516 3048 Getting the latest CLR version.
08:33:30 2516 3048 The latest CLR version is 'v4.0.30319'.
08:33:30 2516 3048 The configuration has been loaded successfully.
08:33:30 2516 3048 Runtime version: v2.0.50727.
08:33:30 2516 3048 Assembly name: preveroXls, PublicKeyToken=E23E60B2903C86B5.
08:33:30 2516 3048 Class name: preveroXls.AddinModuleXls.
08:33:30 2516 3048 Registry key: CLSID\{641F548D-2D88-4286-8647-71A55D36DD22}.
08:33:30 2516 3048 Attempting to create a new instance of the managed add-in class: CLR - v2.0.50727
08:33:30 2516 3048 Loading CLR: v2.0.50727.
08:33:30 2516 3048 Calling CLRCreateInstance method.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Calling GetRuntime method.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Checking if the hosting API of .NET Framework v4.0 beta is installed.
08:33:30 2516 3048 The hosting API is up to date.
08:33:30 2516 3048 Calling GetInterface method for the CorRuntimeHost interface.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Starting CLR...
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Getting the CLR version.
08:33:30 2516 3048 The CLR v2.0.50727 has been initialized successfully.
08:33:30 2516 3048 Creating a new domain setup.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Getting the add-in directory.
08:33:30 2516 3048 Success. The directory is 'C:\Program Files (x86)\prevero-Client\addin2\'
08:33:30 2516 3048 The 'shadow copy' is enabled.
08:33:30 2516 3048 Creating a new application domain.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Unwrapping the managed class.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Querying the add-in extensibility.
08:33:30 2516 3048 Querying the custom task panes.
08:33:30 2516 3048 Querying the ribbon extensibility.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Querying the form regions.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 Getting the dispid of the 'Dispose' method.
08:33:30 2516 3048 Success.
08:33:30 2516 3048 The managed add-in class has been created successfully.
Posted 01 Jul, 2013 07:42:26 Top
Andrei Smolin


Add-in Express team


Posts: 18787
Joined: 2006-05-11
Alex,

Thank you. Is the UDF an XLL or an Automation add-in?

Are there applications from different Office versions installed on that PC?

Also, am I correct assuming that it may work and not work on the same machine?

Is it possible that EXCEL.EXE hangs on the Processes tab of the Task Manager window before you start Excel?

BTW, in what way you start it? From the start menu? Or, by double-clicking a file in Windows Explorer or on the desktop?


Andrei Smolin
Add-in Express Team Leader
Posted 01 Jul, 2013 09:25:04 Top
Matthias Thurner




Posts: 6
Joined: 2013-07-01
Thank you. It is an XLL. It occurs on the same machine. Threre arent different Office Versions. Yes from the start menu. I cant say if Excel.exe hangs on the process tab but i will watch it now.

Regads
Alexander Martineau
Posted 01 Jul, 2013 09:36:13 Top
Andrei Smolin


Add-in Express team


Posts: 18787
Joined: 2006-05-11
An XLL doesn't work if Excel is run via Automation. I wonder if this is the case.


Andrei Smolin
Add-in Express Team Leader
Posted 01 Jul, 2013 10:20:15 Top
Matthias Thurner




Posts: 6
Joined: 2013-07-01
Sorry I was wrong we use the automation add-in with AddinExpress.MSO.ADXExcelAddinModule.

Regards
Alexander Martineau
Posted 02 Jul, 2013 01:38:42 Top
Andrei Smolin


Add-in Express team


Posts: 18787
Joined: 2006-05-11
Alexander,

Sorry for misleading. All Excel UDFs don't work if Excel is run via Automation, see http://support.microsoft.com/kb/213489.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Jul, 2013 02:50:21 Top
Matthias Thurner




Posts: 6
Joined: 2013-07-01
Thank you. I have to say that I new to this topic i just got this project from a another colleague. We don't use crateObject. The Add-In with the UDFs works fine for me. Sometimes it doesn't work e.g. when we test it on VMs or at our customers. When it doesen't work they deregister and register it with admin-rights then it works fine for a while. Do you have any idea how this is possible?

Regards
Alexander Martineau
Posted 03 Jul, 2013 03:26:27 Top
Andrei Smolin


Add-in Express team


Posts: 18787
Joined: 2006-05-11
Hello Alexander,

Matthias Thurner writes:
We don't use crateObject


This is much wider: when Excel is run programmatically, your UDFs will not work. Can you please check if there's an EXCEL.EXE process when you get the issue? Does killing it and starting Excel from the Start menu helps?

Also, please check the if your UDF is listed in File | Options | Add-ins. Also, in File | Options | Add-ins | "Manage" Excel add-ins | Go.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Jul, 2013 06:39:20 Top