How to Set Column width in Excel

Hi

How to set column width in excel , After i run my activity my log is displayed , But in the format with no width column set How do i get the displayed log files with proper width set columns.

Any reason why you need to set Width and height of column?

@iumerparay

Untitled

use it, it is from Excel.Extensions Package, you need to add this package to work with.

3 Likes

how do i set the column width height row herecolumn

so that it always displays in a sequence order.

You can pass any integer value and test it.

1 Like

Mention some pixel value, ex: 120. Then try, else get value from excel and set it here

1 Like

How will setting column width will help here? If it is for attended, then it makes sense.

1 Like

Mention some pixel value, ex: 120. Then try, else get value from excel and set it here.

You need to use select range for that column and then use this activity

1 Like

as i run the activity, log is generated in background, what i am trying to say is it should come in the same format with proper column width after the activity is stopped and log is generated. And even if i use Excel.Extensions Package i have to use it in excel extension scope.

@iumerparay,

Check this xaml, it is working, it increased all the column width to the value mentioned.

SetExcelColumnWidth.xaml (5.8 KB)

1 Like

Hello @iumerparay,

After writing data in excel, you want to auto-fit the column right?
Then, using Invoke VBA could be a option.

firstly write the code below in txt file.

Sub ColumnWidth()
Columns("H:H").EntireColumn.AutoFit
End Sub

Then use Invoke VBA activity in excel application scope and mention txt path and methodName e.g here i’ve used ColumnWidth just change column in above code as here’s H.

image

5 Likes

can you try with shortcut Alt+O+C+A

1 Like

Hi @iumerparay

Here is some activities to set width height for column and rows.
1.AutoFitColumn.
2.AutoFitRow.

It has an option to specify the width and height.

Regards
Balamurugan.S

1 Like

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