I have 1 excel having columns A B C
and having intcap=10; and strname=som;
I want to insert name in 10 rows of c column initially(usually starts from 2nd row index(c2)
and next time intcap=5 then insert name from 11 th row onwards
It looks like you are trying to add Datarow to excel
after 10 row and then from 11
If that’s the case
Read the datatable with read range activity and keep the output as datatable named dt
Now use a assign activity like this
Counter = 0
Where counter is a variable of type int32
Then use a WHILE Loop and mention the condition as counter < 10
Inside the loop use a Add Datarow activity and pass the value as {string.Empty, String.Empty, “your value”} in ArrayRow property and mention the datatable as dt
Next to this add Datarow use a assign activity like this
Counter = Counter + 1
Next time when u try to add any rows with ADD DATATOW activity it gets added from 11 row only
Assign: Assign the starting row based on the value of intcap. For example, if intcap = 10, assign startingRow = 2; if intcap = 5, assign startingRow = 11.
For Each (index) in Range: Loop based on the desired number of rows (e.g., 10 times if intcap = 10, or 5 times if intcap = 5).
a. Assign rowIndex = startingRow + index.
b. Write Cell: Write the name into the “C” column for the rowIndex.
Write Range: Write the updated DataTable back to the Excel file to save the changes.
@panguluri_saritha
Yeah with queues wont require the loop…
when ever you get queue item suppose in_cap=10 and name =som
1.Take assign activtiy
counter= 0
2. Take while Activity and use the conditions
count<in_transaction.SpecificContent(“”).tostring
in side the loop use the add row activity and assign activity and pass like this
So on next Transaction it will replace the count value to 0 and again flow will be same and at the end if all the transactions over use the Write Range Workbook to display out
For me its working exactly as your out only …you can go throw this xaml if not go with this steps
if your doing in Reframework
In Initialization you can create Build datatable and pass in the for each row and in the loop use the Add Queue Item …so it will add the items to queue like in_cap and name