How to update status in excel sheet

Hi All,
I am facing one issue.
I need to fill web form from an excel sheet. After each form i need to add Status (Pass or Fail) in column “Status”. Could somebody plz help.
I tried Assign activity but its not working. Uploaded screenshot for reference.

1 Like

Hi
welcome to uipath community
hope these steps could help you resolve this
–use excel application scope and pass the file path as input
–use read range and get the output with a variable of type datatable named dt
–use for each row loop and pass the above variable as input
–inside the loop use a open browser and mention the url of that web form
–inside the browser to get the value of a specific column use the expression
row(“yourcolumnname”).tostring
–after mentioning them, use a assign activity like this
row(“Status”) = “your string”

–now next to this for each row loop use a write range activity and mention the input as dt and sheetname which will update that new datatable with status column to the excel we need

Cheers @Anamika15

1 Like

Hi,

1)use read range activity so all the data from the excel will be available in Datatable.
2)Use for each row for processing row by row
3)inside the for each row activity, give assign to write the status.(if status pass—> In assign activity row.item(“status”)=“Pass”.
4)this will add the status to the Datatable.
5)once all the rows are completed, use write range activity to write everything in a new excel sheet

image
I am doing this for now. But its not writing in the excel sheet. Please let me know what is wrong in this.
I need to write in the same excel sheet. Not the new one.

1 Like

hi,

Give pass in double quotes.“Pass” and use wite range activity by giving input as the datat table name as mentioned above

hi,

Give pass in double quotes.“Pass” and use write range activity by giving input as the datat table name as mentioned above

you were almost done
Pass is a string so we need to mention them between double quotes buddy

kindly try once and let know for any queries or clarification
Cheers @Anamika15

image
Still not updating the excel sheet. Any suggestion?

1 Like

–in assign mention like
row(“Status”) = “Pass”
–kindly check with the spelling of Status columnname and mention that in the above expression between double quotes
–then kindly use the write range next to the for each row loop
–and mention the range as “” and not as “J1”
you were almost done
Cheers @Anamika15

Hi,

Please remove “J1” and leave it blank . I hope now the ouput will write in excel

ExcelUpdate

“M”+rIndex.ToString

This can work your situation.

Hi @Anamika15

In set transaction state success case
you can follow like below according business exception and system exception as well.

Thanks :slight_smile: This worked.

1 Like

No worries
Cheers @Anamika15

Thanks for the response :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.