Robotic Process Automation: File, Presentation, and Excel Automation (Module 5)
- Course: Robotic Process Automation Design and Development (UiPath) - (BCG701)
- Course Coordinator: Prof. Yogesh N
- Role: Assistant Professor
- Department: Department of Computer Science & Design (CS&D)
- Institution: ATME College of Engineering (ATMECE), Mysuru
Module 5 - File and Presentation Automation Overview
- File Automation Activities Reference:
- Get Folder Info
- Folder Exists
- Create Folder
- Delete Folder
- Copy Folder
- Move Folder
- For Each File In Folder
- Compress/Zip Files
- Extract/Unzip Files
- Get File Info
- File Exists
- Create File
- Delete File
- Copy File
- Move File
- Write Text File
- Append Line
- Read Text File
- Presentation Automation Reference:
- Activities: Use PowerPoint Presentation, Copy Paste Slide, Delete Slide, Add New Slide, Replace Text in Presentation, Add Text to Slide, Add Data Table to Slide, Add Image/Video to Slide, Add File to Slide, Run Presentation Macro, Save PowerPoint File As, Save Presentation as PDF
- Concepts: Sample Overview and File System Structure
Session 1 - File Automation Activities
- Learning Objectives:
- Get properties of a folder
- Check if a folder already exists
- Create, delete, copy, and move folders
- Activities Covered:
- Get Folder Info
- Folder Exists
- Create Folder
- Delete Folder
- Copy Folder
- Move Folder
- For Each File In Folder
Employee Onboarding Sample Scenario
- Case Study Context: The firm is a small organization that has recently hired 20 new employees. The HR team uses three specific Excel workbooks to manage data and onboarding status.
- Workbook 1: EmployeeOnboarding.xlsx
- Purpose: Centralized management of employee lists.
- Data points: Start dates, salaries, required training.
- Function: Main file for organizing sheets, adding input data, formulas, and analysis tables.
- Workbook 2: EmployeeOnboardingInput.xlsx
- Purpose: Contains data for 5 additional new employees needing to be appended to the original list of 20.
- Workbook 3: EmployeeOnboarding Final.xlsm
- Purpose: The final version of the "New Hires List" sheet.
- Function: Needs formatting and macro execution for final delivery.
- Spreadsheet Visuals (Figures 7-1, 7-2, 7-3):
- New Hires List Sheet: Contains columns for ID, Full Name, Start Date, Department, and Status (e.g., Human Resources, Operations, Information Technology, Accounting).
- New Hire Checklist Sheet: Tracks tasks such as Orientation, Employee Handbook, Policy Training, Benefits Package, Direct Deposit Setup, and Technology Setup with statuses: "Complete," "In Progress," or "Not Started."
- New Hire Salaries Sheet: Lists ID, Salary, and Estimated Bonus. Examples of salaries include:
- ID 1: $45,000
- ID 2: $100,000
- ID 11: $105,000
- ID 16: $110,000
Use Excel File Activity
- Category: Found under the Excel category/tile in StudioX.
- Function: This is the foundation for Excel automation and serves as the parent activity integrating StudioX with Excel. It allows the opening or creation of a file. Child activities (copy/paste, sort, filter, etc.) are added inside this block.
- Configuration Settings:
- Excel file (Required): The full file path for the workbook data.
- Reference as (Required): A unique, descriptive name (e.g., "EmployeeOnboarding"). Defaults to "Excel."
- Save changes (Optional): If checked, saves the workbook after every action. Checked by default.
- Create if not exists (Optional): Creates a blank file if it doesn't exist. Checked by default.
- Edit password (Optional): Used for editing password-protected files.
- Password (Optional): Used for opening password-protected files.
- ReadOnly (Optional): If checked, opens in read-only mode, bypassing password protection for data extraction. Unchecked by default.
- Exercise 1: Opening a File
- Goal: Open
Employee Onboarding.xlsx located at C:\BookSamples\Chapter_07\Employee Onboarding.xlsx. - Steps:
- Add Use Excel File to a blank process.
- Select the file path using the folder icon.
- Set "Reference as" to "EmployeeOnboarding."
- Leave default configurations.
Sheet Management Activities
Insert Sheet Activity
- Purpose: Adds an empty sheet to a specific workbook.
- Configuration:
- Create in workbook (Required): The target workbook (pre-populated from parent activity).
- Sheet name (Required): The name of the new sheet.
- Reference new sheet as (Optional): Name used to reference this sheet in later activities via Text Builder.
- Exercise 2: Adding a Sheet
- Goal: Add a sheet named "New Data" to the
EmployeeOnboarding.xlsx file. - Setup: Add Insert Sheet inside the Use Excel File activity. Use Text Builder to type "New Data."
Rename Sheet Activity
- Purpose: Changes the name of an existing sheet.
- Configuration:
- From (Required): Identifies the existing sheet to be renamed.
- To (Required): The new name for the identified sheet.
- Exercise 3: Renaming a Sheet
- Goal: Rename "New Data" to "New Hire Statistics."
- Setup: Add Rename Sheet after Insert Sheet. Select "New Data" in the "From" field and type "New Hire Statistics" in the "To" field using Text Builder.
Duplicate Sheet Activity
- Purpose: Creates a copy of a chosen sheet within the same workbook.
- Configuration:
- Sheet to duplicate (Required): Name of the existing sheet to copy.
- Rename to (Optional): Meaningful name for the copy; defaults to "New Sheet" if blank.
- Exercise 4: Duplicating a Sheet
- Goal: Copy "New Hire Salaries" and rename it to "Salaries Copy."
- Setup: Add Duplicate Sheet inside the parent Use Excel File activity. Select "New Hire Salaries" and type "Salaries Copy" for the new name.
Delete Sheet Activity
- Purpose: Deletes a specific sheet from a workbook.
- Configuration:
- Select sheet (Required): Identifies the exact sheet to be removed.
- Exercise 5: Deleting a Sheet
- Goal: Delete the "Salaries Copy" sheet created in the previous exercise.
- Setup: Add Delete Sheet activity. In the "Select sheet" field, choose "Salaries Copy."
Questions & Discussion
- Audience Interaction: The session concluded with a prompt for "Any Questions?" directed toward the students regarding the implemented Excel automation exercises.
Topics for Next Session
- Excel Automation Continuation:
- For Each Excel Sheet
- Insert Column
- Text To Columns
- Delete Column
- Insert Rows
- Delete Rows