I have a excel file which has 100 records. Script is ready to be executed. At a time it should read only 20 records and execute the script and then followed by next 20 and so on.
Issue : How to read only first 20(Row 1 to 20) and execute the script and followed by next (Say 21 to 40th row)
Hello @Kamesh
do like this
read all data from excel in table dt
then
if dt.rows.count > 20 then
tempdt = dt.select(“1=1”).Take(20).CopyDataTable
dt = dt.select(“1=1”).Skip(20).CopyDataTable
else
tempdt = dt
end if
your code here…
in above tempdt will have only 20 rows that you want to work with…
What @AkshaySandhu has suggested would also work and you can work with the counter as well. Don’t reset the counter and use rowIndex to get the value
Can you please tell me how to use rowIndex activity in excel
Things i planned Create a counter with default as 0 If counter < 20 proceed the work once it exceeds break out of the if loop and then assign or reset the counter to 0 (how to start the row index from 21)