- Overview
- Excel
- Release Notes
- About the Excel activity package
- Project Compatibility
- Supported character encoding
- Project Settings
- Add or Update Excel Sensitivity Label
- Append Range
- Auto Fill
- Autofit Range
- Change Pivot Data Source
- Clear Sheet/Range/Table
- Copy/Paste Range
- Create Pivot Table
- Delete Column
- Delete Rows
- Delete Sheet
- Duplicate Sheet
- Export to CSV
- Fill Range
- Filter
- Filter Pivot Table
- Find First/Last Data Row
- Find/Replace Value
- For Each Excel Row
- For Each Excel Sheet
- Format As Table
- Format Cells
- Get Cell Color
- Get Excel Chart
- Get Excel Sensitivity Label
- Get Selected Range
- Insert Column
- Insert Chart
- Insert Rows
- Insert Sheet
- Invoke VBA
- Lookup
- Match Function
- Protect Sheet
- Read Cell Formula
- Read Cell Value
- Read Range
- Refresh Excel Data Connections
- Refresh Pivot Table
- Remove Duplicates
- Rename Sheet
- Run Spreadsheet Macro
- Save Excel File
- Save Excel File As
- Save Excel File As PDF
- Select Range
- Sort Range
- Text to Columns
- Unprotect Sheet
- Update Excel Chart
- Use Excel File
- VLookup
- Write Cell
- Write CSV
- Write DataTable to Excel
- Excel Application Scope
- Append To CSV
- Read CSV
- Write CSV
- Delete Column
- Filter Table
- Get Table Range
- Insert Column
- Sort Table
- Append Range
- Close Workbook
- Get Cell Color
- Read Cell
- Read Cell Formula
- Read Column
- Read Range
- Read Row
- Select Range
- Set Range Color
- Write Cell
- Write Range
- Save Workbook
- Create Table
- Get Workbook Sheet
- Get Workbook Sheets
- Refresh Pivot Table
- Create Pivot Table
- Get Selected Range
- Copy Sheet
- Delete Range
- Auto Fill Range
- Copy Paste Range
- Execute Macro
- Insert/Delete Columns
- Insert/Delete Rows
- Invoke VBA
- LookUp Range
- Remove Duplicates Range
- Excel Process Scope
- Manage CSV Files
- Filter CSV Files
- Verify CSV Files
- Table Functions
- Manage Multiple Excel Files
- Interpret Excel Results
- Manage Pivot Tables
- Manage Range Selection
- Read From Excel Files
- Manage Databases in Excel
- Compare CSV Files
- Compare Numeric Values
- Sort Data in Excel Files
- Filter and Delete Rows in Excel Files
- Manipulate Range Selections
- Verify Excel Workbook Data
- Read, Write, and Append Data in Excel
- Google Workspace
- Release notes
- About the Google Workspace activities package
- Project compatibility
- Wait for Calendar Event Created and Resume
- Wait for Calendar Event Received and Resume
- Wait for Calendar Event Replied and Resume
- Wait for Calendar Event Updated
- Wait for Email Received and Resume
- Wait for Email Sent and Resume
- Wait for File Created and Resume
- Wait for File Updated and Resume
- Wait for Folder Created and Resume
- Wait for Sheet Created and Resume
- Wait for Sheet Cell Updated and Resume
- Wait for Task Created and Resume
- Wait for Task Completed and Resume
- Add Attendee
- Create Event
- Delete Event
- Modify Event
- Search Events
- Use Google Drive
- Share File
- Delete File Permission
- Get File Permissions
- Update File Permission
- Copy File
- Create Folder
- Delete File
- Download File
- Find Files and Folders
- Get File Info
- Move File
- Upload File
- Create Document
- Create New Spreadsheet
- Get Mail Messages
- Send Mail Messages
- Change Labels
- Use Google Spreadsheet
- Add Delete Columns
- Add Delete Rows
- Auto Fill Range
- Add New Sheet
- Append Row
- Batch Spreadsheet Updates
- Copy Sheet
- Copy Paste Range
- Delete Range
- Delete Sheet
- Get Cell Color
- Get Sheets
- Read Cell
- Read Column
- Read Range
- Read Row
- Rename Sheet
- Write Cell
- Write Range
- Clear Range
- Download Spreadsheet
- Use Google Document
- Batch Document Updates
- Get Document
- Get Text Index
- Insert Text
- Replace Text
- Read All Text
- Create Script Project
- Get Project Content
- Upload Script File
- Create Deployment
- Run Script
- Mail
- Microsoft 365
- Release notes
- About the Microsoft 365 activity package
- Project compatibility
- Connections
- AddEmailCategories
- ArchiveEmail
- DeleteEmail
- DownloadEmail
- DownloadEmailAttachment
- DownloadEmailAttachments
- ForwardEmail
- GetEmail
- GetEmailAttachmentsInfo
- GetEmails
- GetMailFolders
- GetNewestEmail
- MarkEmailAsRead
- MarkEmailAsUnread
- MoveEmail
- RemoveEmailCategories
- ReplyToEmail
- SendEmail
- TurnOffAutomaticReplies
- TurnOnAutomaticReplies
- Merge multiple sheets into a new summary Excel sheet
- Automatically accept calendar invites from your manager
- Move files to dedicated folders by type
- Verify if new employment documents (I9 and ID) match
- Add new customers to a SharePoint List
- Delete SharePoint List items newer than yesterday
- Notify me on Slack when an important Outlook Email is received
- Include creation date in new OneDrive file names
- Notify me by email when a new file is created
- Microsoft 365 Scope
- Add Sheet
- Append Range
- Clear Range
- Copy Range
- Copy Sheet
- Create Workbook
- Delete Range
- Delete Sheet
- Get Cell Color
- Get Sheets
- Read Cell
- Read Column
- Read Range
- Read Row
- Rename Sheet
- Write Cell
- Write Range
- Set Range Color
- Create Table
- Get Table Range
- Insert Column
- Delete Column
- Insert Rows
- Delete Rows
- VLookup Range
- Use OneDrive & SharePoint
- Copy File/Folder
- Create Folder
- Delete File/Folder
- Download File
- Export File as PDF
- Find Files And Folders
- Get File/Folder
- Move File/Folder
- Upload File
- Share File/Folder
- For Each File/Folder
- Forward Mail
- Get Mail
- Move Mail
- Send Mail
- Reply to Mail
- Delete Mail
- Set Mail Categories
- Add Attachment
- Add Attendee
- Add Location
- Create Event
- Delete Event
- Find Meeting Times
- Get Calendars
- Modify Event
- RSVP
- Search Events
- Create Group
- Delete Group
- Get Group
- List Groups
- Create Bucket
- Delete Bucket
- List Buckets
- List Bucket Tasks
- Create Plan
- Get Plan
- List Plans
- Create Task
- Delete Task
- Get Task
- List Tasks
- Update Task
- For Each List
- Get List Info
- For Each List Item
- Delete List Item
- Add List Items
- Update List Item
- Get List Items
- Authentication troubleshooting
- AADSTS50011: Redirect URI mismatch
- AADSTS50076: Using multifactor authentication
- AADSTS50079: The user is required to use multifactor authentication
- AADSTS500113: No reply address registered for the application
- AADSTS65001: The user or administrator has not consented to use the application
- AADSTS7000218: The request body must contain the following parameter: client_assertion or client_secret
- AADSTS70002: InvalidClient - Error validating the credentials
- AADSTS50055: The password is expired
- AADSTS700082: The refresh token has expired due to inactivity
- AADSTS50194: Application is not configured as a multitenant application
- Mail troubleshooting
- Calendar troubleshooting
- Files troubleshooting
- Sheets troubleshooting
- Presentations
- Release Notes
- About the Presentations activity package
- Project Compatibility
- Add or Update Powerpoint Sensitivity Label
- Add Data Table to Slide
- Add File to Slide
- Add Image or Video to Slide
- Add New Slide
- Add Text to Slide
- Copy Paste Slide
- Delete Slide
- Format Slide Content
- Get Powerpoint Sensitivity Label
- Replace Text in Presentation
- Paste Item Into Slide
- Run Presentation Macro
- Save PowerPoint File As
- Save Presentation as PDF
- Use PowerPoint Presentation
- Word
- Release Notes
- About the Word Activities Package
- Project Compatibility
- Word Application Scope / Use Word File
- Add or Update Word Sensitivity Label
- Add Hyperlink to Document
- Add Picture
- Append Text
- Get Word Sensitivity Label
- Insert DataTable in Document
- Paste Chart/Picture Into Document
- Read Text
- Replace Picture
- Replace Text in Document
- Save Document As
- Save Document as PDF
- Set Bookmark Content
Productivity Activities
For Each Excel Row
UiPath.Excel.Activities.Business.ExcelForEachRow
Executes one or more activities for each row in a range, table, or sheet. The activity can be used with an Excel file selected for a parent Use Excel File activity, or with the Project Notebook.
Use this activity when you are working with a range or sheet with multiple rows, and you want to repeat one or more activities for each individual row. Set the activities to repeat inside Excel for Each Row and, when you configure the activities, select CurrentRow from the Plus menu to indicate that you want to repeat the actions for each row in the iteration.
For most activities, you must also select a specific column to use from each row. To find out what options are available for specifying the column depending on your range selection, see How Range Selection Works. You can also specify the column using the Indicate in Excel option under CurrentRow. In this case, you can select any cell from the column you want to use directly from the file.
To learn how to use this activity, see:
In the Body of the Activity
-
For each - Enter the name by which to refer to the current row in the iteration. Using a name that describes the rows in the range makes it easier to identify and select the current row in the iteration when configuring activities added inside Excel For Each Row. For example, for a range with information about a different supplier on each row, you can enter
Supplier
. The default value isCurrentRow
.When two Excel For Each Row activities are added one inside the other, if this name is the same for both, only the option for the nearest one appears in the Plus menu for child activities.
- In range - Click Plus on the right side of the field and then, from the menu, select the range, table, or sheet to use, or select Indicate in Excel to open the file and select a range directly from the file. Alternatively, you can select Custom Input to enter a range, table name, or sheet name manually, or Open in Advanced Editor to enter a VB expression.
- Has headers - If selected, it indicates that the first row in the range is a header row. When you then configure the activities you add inside Excel For Each Row, you can easily identify the data to select from the current row by the column headers.
- Save after each row - If selected, the Excel file is saved during project execution after each row in the iteration is processed. If not selected, the file is saved only after all the rows in the iteration are processed. This option is not selected by default.
Properties Panel
Common
- DisplayName - The name displayed for the activity in the Designer panel.
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Options
-
Empty Row Behavior - Select how the automation should behave if an empty row is encountered:
- StopAfterThreeConsecutiveEmptyRows - Stop iterating after three consecutive empty rows. This is the default option.
- Stop - Stop iterating through rows.
- Skip - Skip the empty row and move to the next row.
- Process - Process the empty row.
- Has Headers - See Has Headers in the body of the activity.
- In range - See In range in the body of the activity.
- Save each row - See Save each row in the body of the activity.
StudioX enables you to define the target range of an Excel For Each Row activity in various ways. The following information describes how different selections for In range influence the range used by the activities added inside Excel For Each Row and the options available for indicating which column to use from the current row.
Entire Sheet
[Excel]Sheet1
- Range used: All the rows where data is present in the sheet.
-
Current Row options:
- If Has Headers is selected in Excel For Each Row, the options are the values in row 1 of the sheet.
- If Has Headers is not selected in Excel For Each Row, the options are the column letters (A,B,C, etc).
Table
[Excel]Sheet1!Table1
- Range used: All the rows in the selected table.
- Current Row options: The values in the table header regardless of whether Has Headers is selected or not in Excel For Each Row.
Named Range
[Excel]Sheet1!Range1
- Range used: All the rows in the selected range.
- Current Row options:
- If Has Headers is selected in Excel For Each Row, the options are the values in the first row of the range.
- If Has Headers is not selected in Excel For Each Row, the options are the column indexes (Column 1, Column 2, etc.).
Unnamed Range
[Excel]Sheet1!B3:F10
- Range used: All the rows in the selected range.
- Current Row options:
- If Has Headers is selected in Excel For Each Row, the options are the values in the first row of the selection.
- If Has Headers is not selected in Excel For Each Row, the options are the column indexes (Column 1, Column 2, etc.).
Entire Columns
[Excel]Sheet1!B:F
- Range used: The rows in the selected columns where data is present in the sheet, including the rows where data is present in other columns than the selected ones.
- Current Row options:
- If Has Headers is selected in Excel For Each Row, the options are the values in the first row of the columns.
- If Has Headers is not selected in Excel For Each Row, the options are the column indexes (Column 1, Column 2, etc.).
Entire Rows
[Excel]Sheet1!3:10
- Range used: The cells where data is present in the selected rows.
- Current Row options:
- If Has Headers is selected in Excel For Each Row, the options are the values in the first row of the selection.
- If Has Headers is not selected in Excel For Each Row, the options are the column indexes (Column 1, Column 2, etc.).
Single Cell
[Excel]Sheet1!B3
-
Range used: Activities identify a range starting with the selected cell as the upper-left corner and expand the range to the right and down as long as there is data in the sheet. For example, if the selection is
Sheet1!B3
and Sheet1 has data up to columnAC
and row115
, activities inside Excel For Each Row use the computed rangeB3:AC115
.If the selected cell is to the right of the last column with data or below the last row with data, only the data in the selected cell is used.
-
Current Row options:
- If Has Headers is selected in Excel For Each Row, the options are the values in the first row of the selection.
- If Has Headers is not selected in Excel For Each Row, the options are the column indexes (Column 1, Column 2, etc.).