How to increase the width of a cell in excel?

Hello All,
I just have a template excel where the data extracted from SAP is being populated…But I just need the width of description field to be a little more wide(Not auto fit)…So is there a code which can be invoked in uipath to just increase the width of the cell?

Thanks and Regards,


Welcome to uipath community

Did we try with vb script or macro ran with activity INVOKE VBA or EXECUTE MACRO inside the EXCEL APPLICATION SCOPE activity

Cheers @geethamrutha_pasumar

Hi @geethamrutha_pasumar,

Welcome to the Community !

How About using UI Automation in Excel.

  1. type into : cell and Enter

2.Click on format : you Have 2 Options now - Specify Column width / Auto Fit Width

  1. Hotkeys can be also used to achieve the above


Hi @geethamrutha_pasumar,

Welcome to UiPath Forum Community !

Here is an aciivity called Autofit column . Using this activity you can auto fit the column width or you can increase the column width.


1 Like

Hi @geethamrutha_pasumar,

Use following VBA code in Invoke VBA activity.

Sub Macro1()

    Columns("E:E").ColumnWidth = 14.67

End Sub

—> change column & width as per your requirement

1 Like