I am reading an excel file and doing a For Each Row activity.
My requirement is, I have to compare the value of one of the column of the current row with that of next row, if the values are same I have to perform below action
*Open the browser and enter the value
If the value of that particular column of current row does not match with the next row, I have to basically skip the processing and move to next row (something similar to row+1)
Can you please let me know how can we achieve this via uipath ?
hope this step would help you resolve this
–use a excel application scope and pass the file path as input
–inside the scope use a read range activity and get the output with a variable of type datatable named outdt
–next use a for each row loop and pass the above variable outdt as input
–inside the loop use a if condition like this rowcounter < outdt.Rows.Count-1
where rowcounter is a variable of type int32 with default value as 0
if the condition passes it will go to the THEN part of if condition
–where we can use another if condition like this outdt.Rows(rowcounter)(“yourcolumnname”).ToString.Equals(outdt.Rows(rowcounter+1)(“yourcolumnname”).ToString)
if this is true it will goto its THEN part where we can have our OPEN BROWSER activity and fill in the field in the web page
–next to this inner if condition use a assign activity like this (at last in the THEN part of first if condition) rowcounter = rowcounter + 1
I am also facing the same problems.in excel if the same column of the next row is empty then I should enter or add the values of row in the same application form where I have enter the first row details.please help me
I am also facing the same problems.in excel if the same column of the next row is empty then I should enter or add the values of row in the same application form where I have enter the first row detail.please help me
If I use the outdt.Rows.Indexof(rowcounter)(“columnname”).Tostring.Equals(outdt.Rows.Indexof(rowcounter+1)(“columnname”).Tostring). Iam getting an error that integer cannot convert to the “system.data.datarow” error.
As I created int32 datatype variable name rowcounter please help me