activities
latest
false
UiPath logo, featuring letters U and I in white

Productivity Activities

Last updated Dec 17, 2024

Delete Column

UiPath.Excel.Activities.Business.DeleteColumnX

Deletes one or more columns from a sheet, table, or range in an Excel file. The activity can be used with an Excel file selected for a parent Use Excel File activity or with the Project Notebook.

Configuring the Activity

In the Body of the Activity

To Delete a Single Column

  • Source - Click Plus docs image on the right side of the field, then, from the menu, select the file and then a sheet, table, or range from which to delete a column, or select Indicate in Excel to indicate a range directly from the file. Alternatively, you can select Custom Input to enter the range manually, or Open in Advanced Editor to enter a VB expression.
  • Has headers - If this option is selected, it indicates that the first row in the defined source range is a header row. When you then indicate the column to delete from the Column name field, the values in the column headers are displayed under Range, enabling you to easily identify the columns. If this option is not selected, the options displayed under Range are the column letters when the source range is a sheet or a range, or the header row values when the source range is a table.
  • Column name - Click Plus docs image on the right side of the field, then, from the menu, select Range, and then the column to delete. Depending on your selections for Source range and Has headers, the columns are identified by the values in the first row of the selection or the letter of the column.

To Delete Multiple Columns

  • Source - Select a sheet or a range that contains the columns to delete.

    Note: Deleting multiple columns is not supported for tables. If you select a table as a source and multiple columns to delete, an error occurs when the automation is executed.
  • Has headers - Make sure this option is not selected.
  • Column name - Enter the letters of the columns to delete separated by colon (:) or comma (,).

    For example, you can enter the following from the Text Builder:

    • A:E to delete columns A, B, C, D, E.
    • A,B,E to delete columns A, B, E.
Properties Panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

Input

  • See the options in the body of the activity.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Options

  • Has headers - See Has headers in the body of the activity.
  • Configuring the Activity

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.