Like many of you, I also need to get active sheet name from Excel file. There are ways to do that by opening excel, sending hotkeys and grabbing sheet name from clipboard. But maybe there is an elegant way - go get if from excel without opening the file?
Active Sheet - the sheet which is displayed when you open excel file.
You can use
Excel Application Scope activity and create an output in it. Then you can use it like in my example:
In ‘GetSheets’ parenthesis you need to put index number of the Sheet (counting from 0).
@Pablito, but I don’t know the ID of active sheet neither.
You can have that in for each loop buddy…!
Kindly have a look at below steps that you can add to your sequence
Excel application scope - get the output of the activity as a workbook type, with name “Out_workbook”
assign activity -
SheetNameList = Out_workbook.GetSheets.ToList()
For each loop with sheetnamelist as item
Hope this would help you…
Here is an activity called Get Sheets name. You can get all the sheet name without opening the files.
I have included a new custom component that to take excel sheets name
Get Sheets Name
ExcelSheetsName.zip (8.1 KB)
The samples are developed by UiPath Studio version : 2018.3.0-beta.1
Here you can download the package.
Thank You for replies, however the problem is that I need to get an Active sheet name. Not the list of all sheets, but sheet which is visible when you open the file.