Autofit column in a excel sheet

Hello, is there any ways in UiPath to autofit every column of a Excel?

The problem I got right now is that I read a Excel using “Preserve format” so if the column is too small, the text get replaced by “#####” and I can’t get the real text.

I tried with the librarie “BalaReva.Excel.Activities” but the autofit method don’t seems to exist anymore. :frowning:

1 Like

I’ve done it by writing a macro that does that, and then use Invoke VBA activity to run that macro.

For the macro itself you could take a look at Range.AutoFit method.

1 Like


You can try with UiPathTeam.Excel.Extensions.Activities, it has autofit option for a column.

@balupad14 :slight_smile:


@MaxyArthes, @Jan_Brian_Despi,

Check this one, it is working.



I have updated the information for Autofit Column and Row with properties here.

Thank you @MaxyArthes and @Jan_Brian_Despi


1 Like

What I did as I was unable to find any others solutions, but some others has been posted now. Just mentioning it for the next people that gonna see this thread :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.