# Insert Columns Workbook (preview)

> Insert Columns Workbook activity that inserts one or more columns into a sheet, before or after a reference column.

`UiPath.Excel.Activities.InsertColumns`

## Description

Inserts one or more columns into a sheet, before or after a reference column. This is the cross-platform equivalent of the [Insert Column](https://docs.uipath.com/activities/other/latest/productivity/insert-column-x) Windows activity.

:::note
This activity does not support `.xls` files.
:::

## Project compatibility

Windows | Cross-platform

## Properties

### Common

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

### Input

* **File** - The full path of the resource workbook. To switch to a local path, select the plus icon, and then **Use Local File**. The current field changes to **File (local path)**, where you can provide the full path of the workbook.
* **SheetName** - The name of the sheet from the workbook.
* **Range** - The range that contains the reference column. When **Has headers** is selected, the first row of the range is the header row. If you use a column letter, it must be inside this range. If you don't specify a range, the used range of the sheet is used.
* **Reference Column** - The column relative to which the new columns are inserted. Enter its header name when **Has headers** is selected, or its letter otherwise, for example, `"B"`. This field is required.
* **Position** - Select whether to insert the new columns **Before** or **After** the reference column. The default value is **Before**.
* **Number Of Columns** - The number of columns to insert. The value must be greater than zero. The default value is `1`.
* **New Column Name** - The header of the new column. It is written in the first row of the range, or of the used range if you don't specify a range. When you insert several columns, the name is written in the first of them.

### Options

* **Has headers** - Select this option if the first row of the range is a header row. **Reference Column** is then a header name. By default, this option is not selected.

  :::note
  Unlike in the Windows **Insert Column** activity, **Has headers** is not selected by default.
  :::

* **Password** - The password of the workbook, if necessary.

### Use Workbook

* **Workbook** - The existing workbook to use instead of a file path.

## Notes

* The activity inserts entire sheet columns, not only the cells of the range. The range only shows where the headers are, or which column letters are valid.
* The existing columns at and after the insertion point shift right.
* A header name that is not in the first row of the range, or a column letter outside the range, causes an error and nothing is inserted.

## Known limitations

Inserting columns into a table is not supported yet.
