I forget to add that
For handling this
Before writing data into cell , use lookup datatable activitiy to lookup for data from the queue to datatable and getting output as rowindex , use that rowindex to fill the cell
So that I handle it
For ur clarity I will explain with example
Let’s say a queue item has following data
Queue 1
Name : xyz1
Email : xyz1@gmail.com
Mobile : 123456790
Etc…
In init state try to read the excel file and store in dt1 varaible and should be in main.xaml so that it can be accessed by other workflows too
Now after updating status as success or failed use the following to update queue status in excel
First use lookup datatable activitiy with following property configurations
-
Datatable : dt1
-
Lookup value : transactionitem.specificContent(“Name”).ToString ( this u can customize accordingly to ur requirements)
-
Lookup Column Name : “Name”
-
rowindex : index , index is a variable which stores the row index of that particular row where lookup value is …
after this use write cell activitiy with following property configurations.
Workbook path : excel file path
Sheet Name : sheet name
Cell : “E”+(index+2).ToString
Data to be written : “Success”
Or
if it is failed transactionitem, then u had to make changes in write cell as follows.
Workbook path : excel file path
Sheet Name : sheet name
Cell : “F”+(index+2).ToString
(Failure details are written in the Remarks column)
Data to be written : reason u need to add for
So the main logic I am telling is before updating status in excel we are checking what is position of the row which contains information about queue item using lookup datatable activitiy.
Hope the above logic helps you
Regards
Nived N
Happy Automation