How to skip scrapped rows?

I have a list of 500 links in google sheet and I scrapped 50 out of it, how do I run it from 51 and not from 1, can anyone help with this, thanks!

Hi @Paul_Li2

give a try with

yourDt.AsEnumerable.Skip(50).CopyToDataTable

Hi @Paul_Li2

You can use the “Read Range” activity in UiPath to read the list of links from your Google Sheet into a DataTable variable. Then, you can use the “For Each Row” activity to iterate through the rows in the DataTable variable, starting from the 51st row.

Here’s how you can do it:

  1. Use the “Read Range” activity to read the list of links from your Google Sheet into a DataTable variable, say “dtLinks”.
  2. Use the “For Each Row” activity to loop through the rows in the “dtLinks” DataTable.
  3. In the “For Each Row” activity properties, set the “StartingIndex” property to “51” so that it starts from the 51st row.
  4. Inside the loop, you can add your scraping logic to extract the information from each link.

Regards,
TuanNNA

Hi I’m pretty new to UiPath, wonder where shd I place this.

as i understand you have your datatable with the information, right?

Hi I’ve tried it but couldn’t find the startingindex property, can you send a screenshot, thank you so much!

yes! this is the screenshot of my datatable!

image

yourDT.AsEnumerable.Skip(50).CopyToDataTable

basically it will remove the first 50 rows from your datatable, then you will loop from that dt

should I place the assign after the google sheet read range? also shd I replace the “yourdt” to my read range variable? thanks

Yes, exactly as you said, after your read range and replace the yourDT var from your datatable variable name

H Frernado, it works! Wondering if there’s any other way to not delete the data above? thanks again for the help!

Well, you can assing that to another datatable, so the first datatable will contain the entire data, and the second, just from row 50 until the end of your first dt

I’m pretty new to UiPath :smiling_face_with_tear:, wondering if you can demo an example? thank you so much

can i know what are you trying to perform?

@Paul_Li2
I attach a photo of my project. You reference.

You can use this method without deleting your data.

Regards,
TuanNNA

Test.zip (2.3 KB)

Just create a new variable of type datatable, in the assign activity put that new variable in the left side, and in the right side the code that i shared above, then you have 2 datatables vartiables, one with the entire data, and the new variable with rows after 50

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.