UiPath doesn’t select the designated excel sheet tab on its runtime even though I confirmed that correct selector of the tab is recognized by UiPath. It keeps selecting other sheets next to the designated one.
If you have any solution or a same issue, would you share that with me?
MS Excel version: Professional Plus 2010
UIPath version: 2016.2.6274
OS version: Windows7 Professional 64-bit
Please check if the control name for the sheet name in the selector is mentioned properly or not.
The selector in the attached image mentions the name “Roger” which is the name of the Sheet to be selected.
It would be easier to isolate the issue if you can share the selector.
Sorry for late reply. I attached the selector image below, so please check this out.
I erased specific sheet names for security reason, but they are wrtten in Japanese.
I implemented UiPath to select sheet2 tab, but as you can see, the red rectangle indicating selected area is not in the right position. The rectangle covers just right part of sheet2. I confirmed XML infromation as well and the information was correct.
Actually, I tried your solution before and it seemed to work.
Still, I’m just wondering why this happens in my environment since I’ve believed selectors can click what I select.
well is it reliable to depend on coordinates? screen resolutions might change on system to system and if excel will open in a minimize state then these coordinates will work?. hot key will generate the same thing
that is rare. you know the template and can fixed it as your requirement or prerequisite.
and one more thing you can take the all excel sheets name and then can decide at what number it is coming then you can fire that many times your hot key
Note: just have to make sure your active sheet always should be sheet1 so you can go forward
Note that I’ve replaced the name of the Excel throughout with a Wild card called ReportName* to make a generic selector.
The last line of the selector is important as it will be used to parameterize the tab name as well!
Problem Statement:
I need to delete a tab named “Incident Info”.
Important: As seen from the screenshot above the tab I want to delete is not the tab in active focus!
Next, get the Find Element result into a UiElement Variable say, wbTab
Then, use the Click Activity and pass the UiElement to it as the Target .
Run your Sequence and it should work. You will see that the Robot will switch focus to the Worksheet you want to delete and make it the active worksheet.
Once you have the active worksheet, you can use hot keys:
Alt + H (home)
d (delete)
s (sheet)
If worksheet has data, a Delete confirmation button needs to be clicked - else this can be skipped
Ctrl+s to save your changes
The Killer test:
Move the worksheet you want to delete to the very ends of the list of tabs.
If your robot can select them correctly at the ends, then you have a reliable solution!
I will try to use a fake worksheet and post code here. Until then, give this a shot!
And here it is! This works reliably each time based on my test.
The Fake Excel file has different tabs in it - some with data, some empty and one tab with a space in its name
The sequence contains an array of sheet names and they are not in any specific order!
Demo 1 of 2: Will simply loop through the array of sheets and correctly select the tabs in the Excel
Demo 2 of 2: Will do the same thing as Demo 1, but will delete each tab and skip the default tab Sheet1
I have a 2 second pause between each action so that this thing is comfortable to follow.
Hope this helps others. I have a requirement to build an attended automation and the Robot owner will need to visually see the operation in progress. Therefore, this approach has been a tremendous help for me in my project!
Make sure that your sequence can access the Sample Excel.