(XLL) UDF function out of order when use Office Interop

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

(XLL) UDF function out of order when use Office Interop
 
Ted Donavan




Posts: 4
Joined: 2008-05-03
I prepared XLL Addin with Addin Express. Than i try to export to Excel from Windows Forms application (look below code)

This is C# Windows Forms Code:


Excel.Application excelApp=new Excel.ApplicationClass();
excelApp.Visible = true;
excelApp.UserControl = true;
workbook = (Excel._Workbook)(excelApp.Workbooks.Add(Missing.Value));(Excel._Worksheet)workbook.ActiveSheet.GetRange("A1","A2").Formula="=MyCustomFunction(25)";


When i open new Excel document like above , (although i can see my xll in addins list) i couldnt access UDF(in xll) from excel the code opened.

Posted 09 May, 2008 08:40:01 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Ted.

Do you see the add-in in the Add-ins dialog of Excel? Is it checked?
Posted 09 May, 2008 17:37:06 Top
Ted Donavan




Posts: 4
Joined: 2008-05-03
Yes.. It seems loaded..
Also when i open excel manually I can access UDF ..
Posted 12 May, 2008 03:44:40 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Ted.

Please try to call the Calculate method of the range after you add a new formula.
Posted 12 May, 2008 05:47:34 Top