How to get active worksheet name … I have used Workbook(Variable).Currentworksheet.name and I’m getting nothing in return
Hi @ABHI_S
Have a look to the below thread :-
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
Hai @ABHI_S,
You can go with VBA script:
ActiveSheet.Name, vbInformation, "Active Sheet Name"
To return the name of the worksheet name to UiPath from the Macro:
Private Function SheetNameMacro() As String
'
' SheetNameMacro Macro'
'
Dim SheetName As String
SheetName = ActiveSheet.Name, vbInformation, "Active Sheet Name"
SheetNameMacro = SheetName
End Function
SheetNameMacro is the function name and also the return value. This value will be returned to UiPath Macro Output variable
To get all the worksheets names in a Workbook you can follow the below procedure:
You have to use “Excel Application Scope” activity O/P variable. i.e of type UiPath.Excel.WorkbookApplication.
Now you have to use the expression:
WorkbookApplicationVariable.GetSheets
Loop through the variable holding values from the above expression. you can get all the worksheets names.
Hope this solves your query!
Cheers!!
We have direct activity to get the sheet name
@varunk Wow Sounds great!! Could you please provide more details about the suggested activity?
Please find the below attachment fir your reference,
still we have to provide index in this field, we are talking about active sheet
Yes absolutely to get the sheet name you require index number
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.