How to AutoFit All Columns/Rows in Excel - UiPath

Hi everyone,
If I need to autofit all columns in an excel sheet so how can I do that?

  • First of all, you will have to enable the ‘Morden Activity’ option in UiPath.

(UiPath.Excel.Activities.Business.AutoFitX - 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.)

1

  • Use the ‘Excel Process Scope’ activity.

  • Use the ‘Excel File’ activity.

  • Use the ‘Autofit Range’ activity.

Configuring this Activity

Select a source - Click the Plus button 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.

Columns - If selected, autofit is applied to the columns in the range.
5

Rows - If selected, autofit is applied to the rows in the range.
6

By default, both the Columns and Rows options are selected.

Enable the ‘Save Changes
7

Run the workflow and enjoy Automation.

Thanks
Ankit Chauhan

2 Likes