Data scraping activity and wrong headers

When I use the data scraping activity on my table it doesnt recognize the headers and instead I get headers like this:

Column-0, Column-1 and so on.

The headers I want appear on the row under.

I would rather not use write range acitivity with add headers unchecked and the read range again with add headers checked. This slows down the process beacuse it needs to save a file for every transaction.

Is there any other way?

Can I make the data scraping activity extract the table but use the second row as columns?

Hi @atomic

I don’t think all web tables exhibit similar behaviour in scraping header row as the first data row. If the headers and data have similar font or the headers are not really distinct, it’s possible that it is scraped as data row.

If you want to avoid write range and read range, you can manipulate the datatable object itself.

  1. For Each → column in datatabale.Columns
    column.ColumnName = datatable.Rows(0)(counter)
    where counter → row index of the for loop
  2. After all columns have been renamed, use Remove Data Row activity to discard the first datarow from the datatable.

Treat this as mostly pseudo-code, so you may need to tweak it to run successfully.
But I hope this approach solves your problem. Let us know if you face issues with this method.