Update existing status of excel cell if the data changes

here is the example

i am downaloding the data from mail which contais job details and ststus

on day 1 i got a mail with job id and job status a s below
===> Job Posting halted Job ID: JP000151 status= haulted

on day 2 i got mail with same job id but status as reopened
===>Job Posting reopened Job ID: JP000151 status= reopened

So now if job ID already exists in excel thenUpdate the Status with latest date data(reopened)
if the job id is totally new add the new row to excel with job id and status

can any one please give me the sample Xaml

@Tanuja

I what form you are getting Data From Mai, I mean through Excel Etc.

Regards,
Mahesh

Hi sry in delay response,

i am getting data in mail
out of that i am splitting jobId and staus and adding row in excel

my problems is, If i get another mail with same jobID and different status ,i want to update the latest status of the of same JobID without creating duplicate rows in excel

example

  1. =======>ist mail=======>JOB456 openstatus ========> enter row in excel with ID and status
  2. =======>2nd mail======>JOB456 Close status ========> update already created row status as closed

Thank you

@Tanuja
Let Us Take you JobID as strJobID and status as strStatus.

Read Your Excel and store the data as dta

Now in If Condition

(From p in dta.Select
Where p(“JobID”).ToString.Equals(strJobID)
Select p)…Count>0

Then

intRowIndex=(From p in dta.Select
Where p("JobID").ToString.Equals(strJobID)
Select dta.Rows.IndexOf(p))(0)

Use Assign Activity

dta.Rows(intRowIndex)(“Status”)=strStatus

Else

Use AddDataRow and Add strJobID and strStatus

Then Write the Excel Sheet by using WriteRange Activity.

Regards,
Mahesh

1 Like

HI mahesh,

its bit confusing as i am totally new to uipath
if you dont mind can you give me sample xaml of your example

that would of great help pleas

thank you
tanuja