Customize headers in excel

Hi Team

I want to color the headers and also bold the headers

and also create all borders around the data in excel

so how can I do it?

Hi @Aishwarya_Bhargava ,

You could achieve your full requirement with vb script. Use vb code to bold the headers and after that you can use set range color activity in uipath to set color to your excel headers. And same way you could add the vb code to create borders. Please refer the sample vb code to bold the headers. Explore on this it might helpful for your requirement. Thanks.

Dim excel As Microsoft.Office.Interop.Excel.Application
Dim wb1 As Microsoft.Office.Interop.Excel.Workbook
Dim ws1 As Microsoft.Office.Interop.Excel.Worksheet
excel = New Microsoft.Office.Interop.Excel.ApplicationClass
wb1 = excel.Workbooks.Open(“Your Excel File Path”)
ws1 = CType(wb1.Sheets(“YourSheetName”), Microsoft.Office.Interop.Excel.Worksheet)
ws1.Range(“A1:J1”).Font.Bold=True
wb1.Save
wb1.Close
excel.Quit
ws1 = Nothing
wb1 = Nothing
excel = Nothing
GC.Collect

Hi @Aishwarya_Bhargava we have custom packages available

Please Refer this video

Also make sure while downloading this custom package from package section try to get the lower version to get desired activities

2 Likes

Hi @Aishwarya_Bhargava did the link server your purpose?

Happy automation

Yes it was really helpful.
thankyou :slight_smile:

1 Like

You also can use micro

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