Page 1
Page 1
Started By
Message

RPA or Excel Macro: Copying sheets from one existing workbook to another.

Posted on 11/15/23 at 11:44 am
Posted by Lazy But Talented
Member since Aug 2011
14441 posts
Posted on 11/15/23 at 11:44 am
I'm starting to dabble in RPA using UiPath StudioX.

I currently have an automation that takes an excel file, adds columns, texts, highlights cells, and then saves the file in a new location.

This has saved me countless mind-numbing minutes, but there are a few more steps that I need to completely automate this process.

I need to copy 2 sheets from an existing workbook into this new workbook that my automation is processing. Is there a way to do this using Studio X or is this more of an excel macro that I should create? (I don't have much experience creating macros).

BONUS: What about unlocking cells? There are specific columns that I need to unlock for the end users to input data, but others that I need to leave locked so they do not overwrite those cells. RPA or Macro?
This post was edited on 11/15/23 at 11:45 am
Posted by TigerinATL
Member since Feb 2005
61456 posts
Posted on 11/15/23 at 12:41 pm to
I built some python scripts recently to do some basic spreadsheet manipulation and setup that I was having to do regularly. And when I say I built them, I mean I told GitHub Copilot what I wanted to do and it wrote the code.

I do code in other languages but have never really worked with Python. I was surprised how easy and effective it was and I am starting to "write" more in python. I would imagine ChatGPT is similarly capable.
This post was edited on 11/15/23 at 12:42 pm
Posted by dtett
Jiggacity
Member since Oct 2018
511 posts
Posted on 11/15/23 at 12:51 pm to
As another poster said, github and google are your friend.

The protecting worksheet thing, select the cells you want to have editable, right click > format cells. Theres a pane in that dialog box that's called "protection", make sure the locked check box isn't selected. In your vba macro, use the following language:

Worksheets("Time Entry").Unprotect "Password"

Your macro

Worksheets("Sheet1").Protect "Password" DrawingObjects:=True, Contents:=True, Scenarios:=True, _
UserInterfaceOnly:=True, AllowFormattingCells:=False, AllowFormattingColumns:=True, _
AllowFormattingRows:=False, AllowInsertingColumns:=False, AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=False, AllowDeletingColumns:=False, AllowDeletingRows:=False, _
AllowSorting:=False, AllowFiltering:=True, AllowUsingPivotTables:=False
Posted by Footbaw
Fulshear, TX
Member since Oct 2015
416 posts
Posted on 11/16/23 at 5:57 am to
I was an RPA lead developer (Blue Prism and UiPath) and system admin for a few years.

As a general rule, if all of your actions are being done in Excel, it's probably easier to just use macros. RPA is best used when automating between multiple applications.
Posted by Lazy But Talented
Member since Aug 2011
14441 posts
Posted on 3/13/24 at 9:53 am to


Thanks for the tidbit. Working on this RPA project landed me a new gig.
first pageprev pagePage 1 of 1Next pagelast page
refresh

Back to top
logoFollow TigerDroppings for LSU Football News
Follow us on Twitter, Facebook and Instagram to get the latest updates on LSU Football and Recruiting.

FacebookTwitterInstagram