While extracting data through data scraping,column names are getting as data instead of column names

In a portal data is there. While data scraping header column names are coming as row data after extraction. In place of column names,column-0,column-1 is coming. How to remove that column-0 & column-1 & use header from portal to filter data. Anyone please help

@vnsatyasunil

You can replace the column names and remove the forst row

  1. Use for loop with dt.Columns and hange type argument to datacolumn
  2. Inside that use assign with currentitem.ColumnName = dt.Row(0)(currentitem.ColumnName).ToString
  3. After the loop remove first row using assign again dt = dt.AsEnumerable.Skip(1).CopyToDatatable

Cheers

Hi @vnsatyasunil

When you are extracting data by using “Extract Datatable” activity. while extracting data in the portal.
Select the settings for the column in the Table Extraction wizard. Give the required column name in the Column name option. while you are filtering data you can give the given Column names.

Regards.

tried this way but table extraction is repeating .I have 2 pages data it is repeating those 2 pages data by clicking prev & next arrows. What is the issue here?

Enable the ‘Extract data from multiple pages’ option in the Table Extraction wizard then you can extract the data from all pages in the portal.

Note - when you enable the above mentioned option it will ask to select the next page button by selecting the next page button the bot automatically extract the data in all pages.

Same way I did. But wondering why it is repeating. Clicked the next arrow after that again it is clicking previous arrow and next arrow continuously. Do we need to set any thing in properties?

Give me the some inputs then it will help me sort things better

Using table extraction, I added columns & enabled multiple pages & selected target element next arrow which is available on the top of the page. For first page, data is extracting but it is not clicking 2nd page and extracting data. I checked selector from Ui explorer it is valid.

Even for data scraping activity also, from 2nd page data is not getting extracted

You can do like this,
Take a count of 1 and run the while loop. In loop Extract Data table and take a click activity to click on next page. See the below picture for better understanding

Note : In the Extract Data table Properties, enable the Append results option for appending the data in the data table.

ok will try. Page numbers can be different according to data. Some times it may be 2,4,7 varies

In this case, do one thing.

while getting different number of pages. Iterate the while loop with max number of pages you are getting in that portal. Then use ‘element exist’ activity to the next page button in portal. Inside of while loop place the if condition and check the element exist is true. If true then extract the datatable else give me the ‘break’ activity to come out of loop.

tried this it is continuously repeating clicking prev & next buttons

instead of passing hardcoded page count as 11(pageCount<11) how can we pass dynamic value.How can we get max number of pages & pass that in condition?

Open the website manually many times consider the how many max pages it was opening. By taking that max pages you can give the counter value in while loop. We already built a if condition when the next page element is not exist then it will automatically come out of loop. Here giving the Dynamic value is not a problem, changing of pages is important.