I actually have a process whereby I need to read an excel file and input data into a website. My process are as follows:
Read Range and store in datatable
Create a WHILE loop
Type Into activities and Click activities inside While Loop
I wanted to know if instead of the While loop we could use a flowchart sequence. Maybe with a counter something like that? Where should we put the Type into activites and so on.
Why would you use while loop to lopp the data in datatable,we can use for each row activity and also if you want a counter for each row activity has automatic counter mechanism built in.
A much better overall solution would be to load the data from the spreadsheet into a queue, then use a workflow to loop through the items in the queue. That way if there’s an error while processing one of the records, when you rerun the automation it won’t reprocess the ones that were already done.
And you don’t use a counter with workflows. You use a workflow decision. Basically your logic would be “are there more records to process” and the true line makes it loop back to do the next one while the false line goes to a finish sequence (or nowhere so it just ends).
I didn’t observe any difference between these two. May be they are accessing data table as two dimensional arrays. But I always use dt1.Rows(RowNumber).item(ColumnNumberOrColumnName) , as these are standard methods of data table objects.