Is there any way I can import an xll into my C# WPF project? I require some of the functions that are usually called via the xll addin in Excel. I have read that xll performs like normal dlls, but sharpdevelop does not seem to be able to read any of its functions and methods. I know the formulas that are usually called in excel, can I access those same functions in my WPF app?
Asked
Active
Viewed 321 times
0
-
There is a duplicate of this exact question, it doesn't have any accepted solutions but I will add one now to give you a few options. – Jeremy Thompson May 03 '17 at 06:17
-
1Dam due to this https://meta.stackoverflow.com/a/256056/495455 I cant close this question as a dupllicate of http://stackoverflow.com/questions/7406934/calling-function-in-xll-file-from-c-sharp **<-- see this QA for my answer** – Jeremy Thompson May 03 '17 at 06:27
1 Answers
0
If, and only if :
- you know the prototype of the function.
- arguments are only primitives C type , (no
xloper
type). - the function is independent of Excel (does not require to be initialized by excel)
then yes you can call it from C# thanks to DllImport

Malick
- 6,252
- 2
- 46
- 59