Page 1 of 1

Excel UDF Add-in with AHK

Posted: 19 Dec 2018, 14:09
by Heezea
Is it possible to write an Excel Add-in with UDFs (user defined formulas) in AHK? I guess the recommended C# or VSTO method to make an excel add-in results in an XLL (just a renamed DLL file). I couldn't find any topics on this via Google or the Forum's search. Everything I found relates to changing the cell's values directly with COM.

The end goal here is to be able to type a UDF in excel that would get it's value from AHK. Please see example below.

In Excel:

Code: Select all

=fAddMe(1, 2)
AHK Code:

Code: Select all

Array[1] := 5
Array[2] := 6
fAddMe(i,j){
   a := Array[i]
   b := Array[j]

   return a+b
}
Excel Result:

Code: Select all

11