How to reference Excel-DNA and call Excel-DNA functions from Power Query?

43 views
Skip to first unread message

Sergey Getman

unread,
May 27, 2023, 1:30:13 PM5/27/23
to Excel-DNA
Is it possible to call Excel-DNA funcitons from Power Query?

When I try to call my Excel-DNA function in my M query like this:
"
#"Invoked Custom Function" = Table.AddColumn(Source, "RunShowCategories", each ExcelDnaUtil.Invoke("RunShowCategories", [TreeFullPath])),
"
I get the next error: "Expression.Error: The name 'ExcelDnaUtil' wasn't recognized.  Make sure it's spelled correctly."

At the same time I am able to call my RunShowCategories Excel-DNA function from the same Excel worksheet where I have the above M query without any problems, because I referenced my .xll as an Excel addin already.

Please explain how to call Excel-DNA functions from Power Query correctly. 

Govert van Drimmelen

unread,
May 27, 2023, 2:26:47 PM5/27/23
to Excel-DNA
I don't think this is supported by Power Query.

-Govert

Sergey Getman

unread,
May 28, 2023, 2:22:51 AM5/28/23
to Excel-DNA
That is a pity, but thank you for the clarification, and there is a work-around for that anyway.
Reply all
Reply to author
Forward
0 new messages