0
votes

How can I recover the global app i'm being called in for a User Defined Function under Microsoft Office c# without VSTO.

I'm using XLV, which enables writing excel UDF's as .xll (.dlls for excell) without Visual Studio Tools for Office (VSTO).

My main question is how to recover the current application, current workbook current worksheet, invoking cell.

Under VSTO this is available under the app global variable.

I'm certain there is a global populated with a pointer in one of the dll's.

Cheers!

dr.K

1

1 Answers

0
votes

yes, it is called global. it is some weird pseudo global construct build by VSTO. it makes for simple looking code like this ;

    Excel . Application eA = Globals . ThisAddIn . Application;
    Excel . Workbook nWB=Globals . ThisAddIn . Application . ActiveWorkbook;
    Excel . Worksheet eS = eA . ActiveSheet;