- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-04-22 01:23 PM
I need to get a sheet from one Excel file and copy it to a specific range on another Excel file. The 'Copy Paste Worksheet Range' activity does that successfully but only when I'm debugging or when I'm running at my machine.
But, when I execute it on a Virtual Machine via Control Room, I get the error "Failed to Select row: select method of Range class Failed". If I open the VM and watch the process, that same error happens.
Can anybody help me?
Thanks in advance!
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-04-22 09:27 PM
Hi @Felipe Gaia,
Are you using single handle or multiple handles?
I would prefer using single handle even for handling multiple excel files. Please use the below set of activities to achieve the functionality:
1) Use Select action to select the range which needs to be copied from 1st excel.
2) Use Copy action to copy the range
3) Use Activate worksheet to activate the destination worksheet
4) Use Go to Cell to go to the destination cell where pasting needs to be done
5) Use Paste action to finally paste the data.
It should work. Please let me know if it doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-04-22 03:15 PM
Select Method of Range class failed: This usually occurs when we try to select the cells other than the active sheet without making the sheet select or active.
Try to make active sheet and then run this activity once and check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-04-22 03:39 PM
I already tried Select but it didn't work. Now I tried Activate but got the same error.
Do you have any other suggestion? Forgot to mention that both workbooks are opened, but I don't believe this is the reason why I'm getting this error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-04-22 09:27 PM
Hi @Felipe Gaia,
Are you using single handle or multiple handles?
I would prefer using single handle even for handling multiple excel files. Please use the below set of activities to achieve the functionality:
1) Use Select action to select the range which needs to be copied from 1st excel.
2) Use Copy action to copy the range
3) Use Activate worksheet to activate the destination worksheet
4) Use Go to Cell to go to the destination cell where pasting needs to be done
5) Use Paste action to finally paste the data.
It should work. Please let me know if it doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-04-22 11:44 PM
Can you try putting some delay after opening each of the workbooks using 'Sleep' action from 'Utility - General' VBO as shown below. Also, ensure that you use the 'Show' action as without this from Office 2013 onwards there are some issue that happens while using this action in the background mode:
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-05-22 03:32 AM
A co-worker later found out that there was an error on the object code.
But these steps that you described were the ones that I already put on the process, so I'm marking your reply as best answer so people with this problem in the future would follow it 🙂
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-05-22 03:39 AM
Sorry for taking too long to reply. Thank you for the answer!
In my case a coworker found out that there was an error on the object code, we fixed it.
And yes, the 'show' activity is very important when using 'copy paste' activity, I hope your reply can help someone having this problem in the future 🙂
Thanks again!
