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