Use the Delete row or column action in the Automation 360 Microsoft 365 Excel package to remove specific rows, columns, or ranges from an online worksheet. You can target a single row or column by number/letter, target the active cell's row or column, or delete a contiguous range in a single operation.
This action is useful when you need to:
- Remove a processed or archived data row after writing it to a target system
- Delete a trailing summary or footer row before exporting cleaned data
- Remove an unused or placeholder column before downstream processing
- Bulk-delete a block of rows or columns by specifying a range instead of looping
- Deleting a row shifts all rows below it upward. Deleting a column shifts all columns to its right leftward. Update any row or column-indexed references in subsequent actions accordingly.
- There is no undo within a bot run. Data in deleted rows or columns is permanently removed from the worksheet for that session.
- To delete multiple non-contiguous rows or columns, pair this action with a Loop action and call Delete row or column for each iteration.
- Range syntax for rows uses a numeric colon format:
start:end. Range syntax for columns uses letter notation:startLetter:endLetter. Both are inclusive. - This action operates on the worksheet associated with the specified session. To target a different worksheet in the same workbook, switch the active sheet first. See Switch to sheet action in Microsoft 365 Excel.
Prerequisite
- Establish a connection to Microsoft 365 using the Connect action. See Using Connect action in Microsoft 365 Excel package.
- Open the target workbook using the Open action and note the session name. See Using the Open action.
- If the workbook has multiple worksheets, use the Switch to sheet action to activate the correct sheet before deleting. See Switch to sheet action in Microsoft 365 Excel
Settings
- In the Actions palette, double-click or drag the Delete row or column action.
- In the Microsoft 365 Excel session field, enter the session
name you specified in the Open action.
Click the Insert a value icon to select a variable if the session name is stored as a variable.
- Select one of the following operation types:
Row Operations
- Select Delete Row at to delete all cells in a single
specific row. Enter the row number in the field.
Example: To delete row 10, enter
10. - Select Delete Row by to delete cells in either:
- The row of the currently active cell, or
- A specific range of rows. Enter the range using
start:endformat.Example: To delete rows 1 through 5, enter
1:5.
Column Operations
- Select Delete Column at to delete all cells in a single
specific column. Enter the column letter in the field.
Example: To delete column D, enter
D. - Select Delete Column by to delete cells in either:
- The column of the currently active cell, or
- A specific range of columns. Enter the range using column
letters.
Example: To delete columns A through E, enter
A:E.
- Select Delete Row at to delete all cells in a single
specific row. Enter the row number in the field.
- Click Save.
Example
Your automation downloads a monthly sales report that includes a two-row summary footer (rows 51–52) and a Updates column (column G) that is not required for downstream processing. You want to clean the data before writing it to a target system.
- In the Actions palette, double-click or drag the Delete row or column action.
- In the Microsoft 365 Excel session field, enter
DeleteRowSession. - Select Row Operations.
- Select Delete Row by.
- Enter
51:52in the range field. - Select Column Operations.
- Select Delete Column at.
- Enter
Gin the column field. - Click Save.
Result: The worksheet is cleaned now. Footer rows and the Updates column are removed and are ready for the next step in the automation.