BalaReva.Excel.Activities : Autofit

I have question in BalaReva.Excel.Activities :Autofit
I use in Excel Application scope as pic

It has error as “AutoFit Columns: AutoFit method of Range class failed”
How can I fix it?

Hi @Supakinee_Navawong_na_ayu

Are you trying to Autofit your whole excel sheet’s data? or specific data column?

Just try it out by mentioning anything inside Column Range {""} in the Properties panel!!, It may work

Happy Automation !!

My Excel is

I want autofit in Column D : GL_Date
I try to input {“D:D”}
in Properties : Column Range
but It still error.

HI @Supakinee_Navawong_na_ayu,

This is BalaReva. Don’t use the Autofit activity inside the excel scope.

Thank you

I cutting Excel scope off but it’s still error .

can you please print the full file path using WriteLine activity ? What is the error you are getting ?

Thank you

File : C:\Users\Supakinee.N\Desktop\Excel\KTCCA_01UploadTHB1_Intl VISA SETT.020121 MARK.xls

send me the error.

if you don’t mind, can you share a sample file to test at my side.?
Thank you

KTCCA_02UploadUSD1_Intl VISA Sett.020121.xls (76.7 KB)

This is my excel file .My point is copy data from Sheet Name : “Data” to the same file name but file type is “.CSV”

It’s not work if open excel file with some columns display as “######” . It must be autofit column.

Thank you

it is working perfectly… (85.5 KB)

Thank you

Sorry ,But I can’t open it becase of the Uipath version that mine can not upversion.
Could you please capture it as pic for me please?

Hi @Supakinee_Navawong_na_ayu … As Yoichi suggested, you can use Autofit in Studio by checking the studiox filter in the activities. Once you done, you can use the below solution…

XAML: (46.2 KB)

My Input: You can see content in Column B and Column C needs a autofit…

Output: Here is the Autofitted content…

Hope this helps…

My studio version is version 2019.4.4. It can not up to higher version.
I can not Autofit in Studio by checking the studiox filter.

1 Like

@Supakinee_Navawong_na_ayu - ok please check this out… (89.9 KB)

This workflow just has only one activity - Autofit…


1 Like

Thank you. It’s work for my job. :+1:


@Supakinee_Navawong_na_ayu - Glad it worked… please mark my post as solution, as it help others…

1 Like

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