Banner background image
Productivity Activities
Last updated May 22, 2024

Delete Range



Uses the Microsoft Graph Clear range (when Shift is None) or Delete range (when Shift is Up or Left) API to delete a range of cell data (Range) from a specified workbook (Workbook) worksheet (SheetName).

Project compatibility

Windows - Legacy | Windows



  • DisplayName - The display name of the activity. This property supports String variables and string formatted values.
  • Range - The range to delete. Enter your range in A1-style notation. For example, if you have data in cells A1:B5, and you enter "A1:B3", the data in cells A1:B3 is deleted and the data in cells A4:B5 remains and shifted according to your specified Shift value. This property supports String variables and string formatted values.
  • Sheet Name - The name of the sheet from which to delete the data. This property supports String variables and string formatted values.
  • Shift - Indicates how the surrounding cells respond once the range is deleted. Use the drop-down list to select one of the three options:

    • None - Default. The cells outside of the specified Range are unchanged and the deleted range of cells is left blank.
    • Up - The cells below the Range are moved up to populate the deleted range of cells.
    • Left - The cells to the right of the Range are moved left to populate the deleted range of cells.
  • Workbook - The DriveItem of the document to modify. This object can be retrieved using the Find Files And Folders activity. Use the output property variable from either the Find Files and Folders (First or Results) or Create Workbook (Workbook) activities. When using the Results output property from the Find Files and Folders activity, be sure to specify which item in the array that you want to use (e.g., myWorkbooks(0)).
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.

How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

  1. Complete the Setup steps.
  2. Add the Microsoft Office 365 Scope activity to your project.
  3. Add an activity or run an external process that outputs a DriveItem object (e.g., Find Files and Folders, Create Workbook, Copy Item).
  4. Add the Delete Range activity inside the Microsoft Office 365 Scope activity.
  5. Enter values for the Input properties.
  6. Run the activity.

    • Your input property values are sent to the ClearRange or DeleteRange API.

  • Description
  • Project compatibility
  • Configuration
  • How it works

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.