How to add headers in the data table

how to add headers to a sheet which is headerless.
my excel sheet is like this

I want to add City Name on coulmn 1 and Index Value on Column 2 as Headers

lets assume you have read in the excel into a datatable. Add Headers was ticked Off, as no header cols were present in the Excel

the auto generated Column names can be changed by using an assign activity:
left side: YourDataTable.Columns(0).Columnname(0)
rightside: “YourNewColName” - City Name

I do not have headers in my sheet.
i have to add my own custom headers.
how to do that?

AddHeaders - When selected, the column headers from the specified spreadsheet range are also extracted. By default, this check box is selected (set to True).

taken from:

when not ticked addd Headers the columnnames are generated automaticly
changing the columnnames can be done as described above

Bro, you do not understand my query.
i know we can select tick on add headers and it will generate automatically headers
But in the excel file , which i am working , there are not headers at all. How to add custom headers by our own

read range,
customize column name
write range

result is excel with headers

insert a new row on first position and writing there the needed Column names into cells

1 Like

Thanks buddy

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