Invoke vbscript activity issue

Hi Team,

I am facing issue with Invoke VBscript activity.
i am trying to get sheet name from workbook for the same i have written below vbscript. need help to get return value from this in output of invoke vbscript acitivity

Public Function GetFirstSheetNames()
Set filename = Wscript.Arguments
Set objExcel = CreateObject(“Excel.Application”)
Dim sheetName
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Open(WScript.Arguments.Item(0))

For Each objWorksheet in objWorkbook.Worksheets

sheetName = (objWorksheet.Name)

Next

Wscript.Echo sheetName
GetFirstSheetNames = sheetName

End Function

Hi @sunny1

Maybe not a direct answer, but you can get the sheets by using the Excel Application Scope and then extracting that info from the output variable:
image

image