How to extract last 50 rows data from Google Sheet?

Hi, can you help me find a solution for my issue? I’m trying to extract last 50 rows data sets from Google Spreadsheet, my current way is to delete the above rows. But I don’t sure which way can I use… I tried to use Delete Range activities to manually declare the row number, but I failed to use variable declaration to target the last 50 row , what can I do just only manually write A2:F19 and it’s to delete unuse rows. I’m still trying to create the template where every time user click into the process it will automatically generate last 50 sets data in a Google Spreadsheet. If there is any way to proceed to the result it’s ok.

@ZONG_YOU_TOH

Welcome to the community

Use a read range and get all the data and then use the below to get only last 50 rows into a datatable using assign

Dt = dt.AsEnumerable.Skip(dt.RowCount-50).CopyToDataTable

Cheers

1 Like

Thanks Sir, after finding the answer for several hours I finally found the answer at 10 minutes ago, but your answer is an important knowledge for me. Nice to meet you, Sir! :smile:

1 Like