Change Excel format inside it: width of columns and rows

I’m working on an automation. I’m extracting specific information from a wide range of PDFs and, I’m extracting them into an Excel. I put the information into the Excel with Build Data Table, Add Data Row and Write Range. I could pass all the information into the Excel. However, my problem is with the format inside.

When I extract the information, the excel looks like this:

Which is really bad looking and not useful for me. I want to look the excel like, at least, the second photo:

My ideal Excel is like the third photo:

Therefore, I want to know whether is a way to change the width of columns and rows to have my excel like the third photo. And, if there is a way, which I didn’t find, how to do it.

Thanks a lot!

Hi @Garcia_Hoyos_Daniel

Use invoke vba activity inside excel application scope and change the row and column size as you need.

This will autofit the cells, change the row height and width as you need.

(Pass the textfile path and sub name(autofit) in invoke vba activity)

VBA_Script.txt (103 Bytes)

@Garcia_Hoyos_Daniel or you can use @balupad14 activities

Refer below

1 Like

Hi @prasath_S and @Pravin_Patil1 ,
thanks for the answers, I’m gonna try both ways. I’ll tell you if I have some problem.


1 Like

Hi @Pravin_Patil1 ,
I’ve tried the activities that you sent me. The thing is that I have +80 rows in the excel and in the photo below I want to put a range between the 1 and the 80 row. However, in what you sent me, to write Rows Range is {numberofrow1, numberofrow2,…}
Do you know how to write the Range between row 1 and 80 instead of writing 1-80 numbers?



Can you guide @Garcia_Hoyos_Daniel here with the activity question

Hi @Pravin_Patil1 ,

You can give the row range like this.

Thank you

H @balupad14 ,
it works thanks!
Moreover, I want to align in the middle the text in the cells. Can I do it with your activities?
Thanks again!

1 Like

Yes. You can…

Thank you

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