# Delete Column

> Delete Column activity that deletes one or more columns from a sheet, table, or range in an Excel file.

`UiPath.Excel.Activities.Business.DeleteColumnX`

## Description

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](https://docs.uipath.com/activities/other/latest/productivity/excel-application-card) activity or with the Project Notebook.

## Configuring the activity

### Designer panel

**To Delete a Single Column**

* **Source** - Select **Plus** 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 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** - Select **Plus** 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.
