How to scrap only one row from a table?

I have a table from which I have to scrap a single row using data scraping. How can I achieve this?

Scrap the data, retrieve it in a string. Then split the string to gain the content you actually need.


Use Data Scraping to read table and will give you output as DataTable and say ‘DT’.

To read first row from DataTable - DT(0)

1 Like

@lakshman I need to extract the row where Year = 2018. How can I do that?


If it is possible, you can try like this way also

row = dtTest.AsEnumerable.FirstOrDefault()


Pradeep Sridharan


Try below one:"Year = ‘2018’ ") - It will give you array of data rows as output.

@vivek_Chowdary You can use for each row activity then use if activity to choose what row of the table you want to get. Sequence.xaml (8.8 KB)

@lakshman Its not working. I am getting the following error:

I am trying to get the row with year=2018 from that table above.


Follow these steps:

  1. First scrape Data from Website and will give you output as ‘DT’.
  2. Then apply filter -"Year = ‘2018’ ").copytodataTable and store output in variable of type DataTable and say ‘NewDT’
  3. Then use Output DataTable activity to convert dataTable to string and pass NewDT here. Then display output string using message box.

@lakshman I am still getting the above error!!


Could you please share your workflow with me and need to check once.

These should work.

  1. Scrape Data then save sa DataTable
  2. Use For each row activity to iterate each row
  3. Use if activity inside the body of For each Row
  4. Input these as the condition → row(“Year”) = “2018”
  5. Inside then use assign activity to assign the values of the rows. (e.g. row(“mat”).ToString, row(“Inns”).ToString and so on)

Hope this helps

yes sure

@lakshman (25.0 KB)


Please find the attached workflow. Here, Column name is ‘Year’ but you used ‘Column-0’. I changed now. Please run it and let me know. I am not able to open this site because my company blocked it. (26.6 KB)

@lakshman Nope, it isn’t working. Same error.


After scraping data and write into excel file and send me once.

Player Stats.xlsx (9.4 KB)


I tried its working for me. Please find the attached file. Here, I am reading input data from excel and then filtered it and displayed. Run it and check once.

Main.xaml (34.9 KB)

Note: Just change the file path in Excel application scope and run.

no it isn’t working on mine.