# Autofit Range

> `UiPath.Excel.Activities.Business.AutoFitX`

`UiPath.Excel.Activities.Business.AutoFitX`

## Description

Changes the displayed column width and row height in the specified range to the widest entry in each column and the highest entry in each row.

## Configuring the activity

### Designer panel

* **Select a source** - Select **Plus** on the right side of the field, select the file, and then select a named range, table, or sheet as the source, or select **Indicate in Excel** to open the file and select a range directly from the file. To enter a range, table, or sheet manually, select **Custom Input**. Alternatively, you can select **Open in Advanced Editor** and enter a VB expression.
* **Columns** - If selected, autofit is applied to the columns in the range.
* **Rows** - If selected, autofit is applied to the rows in the range. By default, both the **Columns** and **Rows** options are selected.

### Properties panel

#### Common

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

#### Input

* **Range** - See **Select a source** in the body of the activity.

#### Misc

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

#### Options

* See the options in the body of the activity.
