Definition and Usage
This command inserts rows above or below a specified target row in an Excel worksheet. It allows you to add multiple empty rows at a specific position in your Excel worksheet, which is useful for creating space for new data or organizing existing content.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Excel instance | Please select an Excel instance to identify the instance to operate on | N/A | Yes | Must be created via the "Launch Excel" or "Get active Excel worksheet" command |
Worksheet name | Specify the worksheet name | N/A | No | Leave blank for the active worksheet |
Insert direction | Choose whether to insert rows above or below the target row | Below, Above | Yes | N/A |
Target row | Specify the starting row number | N/A | Yes | Use 1 for the first row, or -1 for the last row |
Number of rows | Specify the number of rows to be inserted | N/A | Yes | Must be a positive integer |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This action doesn't produce any variables.
Using Variables in Conditions
You can use variables in any parameter field where you see the {x} icon. For example, you can use a variable to dynamically determine the target row or the number of rows to insert based on conditions or previous actions in your workflow.
Notes
Before using this command, ensure that a valid Excel instance has been created and the target worksheet is accessible.
If you specify -1 as the target row, the rows will be inserted at the end of the used range in the worksheet.
The inserted rows will inherit the formatting of the row above or below (depending on the insert direction).
When inserting rows, any existing data will be shifted down to accommodate the new rows.
If the worksheet is protected, this operation may fail unless the worksheet protection allows for inserting rows.