Adding header to excel!

How can I add headers to the excel sheet I created from a Datatable. and avoid the loop to add it between every row?
So what i am trying to do is to check if the excel sheet has empty rows to write range if no to append

thanks

@khaled_emad

You can use add header property to add the headers

If you are adding it multiple times…then first time use write range wirh add headers and from
Next time you can either use append range or write range without add headers and passing the cell value appropriately

Cheers

Hi @khaled_emad ,
If you have the datatable directly use write range activity to write all headers in excel.

Regards,
Arivu

HI @khaled_emad

If the have the data in the Data table and check the file is exist or not.

You can use If activity to check the file exist

File.Exists("C:\Users\Dell\Documents\UiPath\Test\BuildDt.xlsx")

image

Regards
Gokul