Sam
Sam

Reputation: 291

Set html table header as rpa collection header

Ive managed to get html table and change it to collection. However i would like for the table header to become the collection header. Is it possible to do it? Thanks.

Below is for further details on how i take the table element and change it to collection.

The path that im getting from the html table inside application modeller:

/HTML/BODY(1)/DIV(2)/FORM(2)/DIV(1)/TABLE(1)

Then i use Read stage and choose the table as the element and set Data as Get Table function and save the collection.

The collection result produces:

On header - Column1(text), Column2(text)....

First Row - Department, Name.... || This supposed to be the header

Second Row - DepartmentData, NameData....

Upvotes: 0

Views: 1366

Answers (1)

Andrzej Kaczor
Andrzej Kaczor

Reputation: 1557

Well, I got the action called "Set Column Names From First Row" in Utility - Collection Manipulation. Do you have it too?

If not, then here's the code:

Dim iThisColumn as integer = -1
For Each Column As DataColumn In Input_Collection.Columns
   iThisColumn +=1
   Column.ColumnName=CStr(Input_Collection.Rows.Item(0).Item(iThisColumn))
Next
Output_Collection = Input_Collection

enter image description here

Upvotes: 2

Related Questions