Automaion Addin not loading properly!!

G

Guest

Hi,

We have some excel sheet where data is getting filled up by function inside
an automation addin dll. The excel sheets are launched from within another
..NET application. My problem is that when the excel sheets are launched the
AddIn is not getting loaded properly. So all the functions are not avaliable.

I have created a simple prototype where I have created a simple excel sheet
and used some of the functions from the same Addin and it works fine. Only
when another application is launching the excel Sheet, the problem comes it
seems.

Can anybody tell what I should do to load the Addins. Strangely the AddIn
check box is checked even though the Addin Functions do not show up in the
function list and the sheets cells do not get correct values.

Thanks in advance.
Abhijit
 
K

keepITcool

Abhijit,

when excel is opened thru automation addins are not loaded.

note if your addin is an xll or dll you need to call:
application.registerXLL("path for xll")

here are some examples for normal addins (xlas):

assumes XL is excel.application object
For Each ai In XL.AddIns
If lcase(ai.Name) = "myfirst.xla" Then
XL.Workbooks.Open(ai.FullName)­.RunAutoMacros 1
End If
Next
For Each ai In XL.AddIns
If lcase(ai.Name) = "mysecond.xla" Then
XL.Workbooks.Open(ai.FullName)­.RunAutoMacros 1
End If
Next
'in case you need the other addins...
For Each ai In XL.AddIns
if ai.installed then
if lcase(ai.name) <> "myfirst.xla" _
and lcase(ai.name) <> "mysecond.xla" then
XL.Workbooks.Open(ai.FullName)­.RunAutoMacros 1
End If
end if
Next

HTH
--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Abhijit wrote :
 
T

Thomas Risi

Hi Abhijit,

first i thought it's a problem with the framework. But the problem also
appears in unmanged code.

Starting excel from the commandline, seems to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top