Returning value from Excel VBA function is always null
问题 I'm attempting to run excel vba macro and get back result but I'm always getting back null (excuse my ignorance, I'm new to this macros) the macro Public Function TestMacro() As Boolean If Len(Range("A1").Value) <> 9 Then TestMacro = False Else TestMacro = True End If End Function the c# code invoking it Excel.Application excelApp = new Excel.Application { DisplayAlerts = false }; object misValue = Missing.Value; excelApp.Visible = false; Excel.Workbook ExcelWorkBook = excelApp.Workbooks.Open