I am actually trying to use the Gamma_Inv function but to minimize the complexity of having lots of variables I will use the pi function instead as it illustrates my problem more simply.
my code is:
Public Class LoadData
Shared Sub Main(ByVal cmdArgs() As String)
Dim fred As WorksheetFunction
Yes, unfortunately you need a running Excel Application to use the Worksheet Functions.
Dim app = New Microsoft.Office.Interop.Excel.Application Dim wf = app.WorksheetFunction MsgBox(wf.Pi) MsgBox(app.Evaluate("PI()")) app.Visible = True ' optional app.Quit() ' don't forget to close it when done !
Evaluate method is a bit slower but can evaluate almost everything that can be used in the Excel Formula or Address Bar.