So I can’t click ‘add headers’ when I put them in to a datatable.
Please can I ask if there is a ui path solution to this (i.e not change the name of the headers in the excel sheet) as I suspect i’ll come across this more than once in my RPA career!
yah we can use without enabling ADD HEADERS and we can get the column values by mentioning the column index instead of column name inside the for each row or any activity
like this dt.Rows(rowindex)(columnindex).tostring -in a assign activity
or inside the for each row loop row(columnindex).ToString
but ensure that the first row is skipped as it is the headers that we know explicitly
so in assign start from 1 as row index like this dt.Rows(1)(columnindex).tostring -in a assign activity
and inside the for each row loop use a IF condition to validate like this Not dt.Rows.IndexOf(row).Equals(0)
if true it will go to THEN part where we can have our process or set of activities we want
Hey @Palaniyappan so in the THEN part of the If (your last sentence), that’s where I could have my ‘add to queue’ activity so it doesn’t add the top row of the data table to the queue (the headers)?