Hi All,
I have excel which i want to add to queue. I want to add every 10 rows reference number. How to add that.
Example: Like 100 rows i have i want to add reference number in 10,20,30,40 th row.
Please help me
Hi All,
I have excel which i want to add to queue. I want to add every 10 rows reference number. How to add that.
Example: Like 100 rows i have i want to add reference number in 10,20,30,40 th row.
Please help me
@thima Are you using REFRAMWORK?
Here is Pseudo code:
Read Range
activity to read the Excel file and store the data in a DataTable
variable.For Each Row
activity to iterate through each row in the DataTable
.If
activity to check if the row index is a multiple of 10. You can use the Modulo operator (row.Index Mod 10 = 0
) to check if the row index is divisible evenly by 10.Add To Collection
activity to add the row (or a specific column) to a queue. Ensure that you have already created the queue variable.Hi,
Take a counter value initialize to 1
Add a item to the queue everytime. Increment the counter after adding the item to the queue
In the if condition if the counter value is divided by 10 which gives the result 0 Give a reference number to it.
Thank you
Hi @thima
Within the For Each Row activity, use an If activity to check if the current row’s index matches the desired reference number rows (10th, 20th, 30th, 40th, etc.).
You can use the “rowIndex” property of the For Each Row activity to access the current row index.
Inside the If activity, use the Add Queue Item activity to add the reference number to the queue.
Hope it helps.
[quote=“raja.arslankhan, post:2, topic:562324”]
row.Index Mod 10 = 0
[/quote
Thanks a lot its working
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.