How to select a specific row for processing

Hi There

I’m working on an automation project in which I need to feed data from an excel into an application on Citrix, need to process only those rows where value in “Status” column is NULL, also need to update the “Status” column as Pass or Fail after the data for the specific row is uploaded into the application.

Can someone help with the solution please.

Regards

VK

Is Excel Path accessible by Robot? Then Read Range should work.

dtCitrix.Select(Status is NULL)

For each row
//feed to Citrix
    If(CitrixUploaded)
     row("status") = "Pass" or "Fail"

or

For each row

if(string.IsNullOrEmpty(row("status").ToString))
{
 // feed to Citrix
 If(CitrixUploaded)

row("status") = "Pass" or "Fail"
}

Write Range - dtCitrix

Hi Vaidya

Thanks for the reply!

Yes, Excel path is accessible to the BOT.

Would it be possible for you to share the XAML for this as I’m new to coding.

Regards

VK

status.xaml (14.2 KB)

Hi Vinay

Thanks for the help, it did helped but partially. The BOT is now picking the right rows (i.e. the rows having status as ‘NULL’) to insert into the application. However, the status column is not being correctly updated with a ‘Pass’ or ‘Fail’. I’m using the below syntax to get the status updated for the rows which have been picked up for processing having status as ‘NULL’ but it is updating from row 2 and not just the one which has been processed.

“C” + dtCitrix.Rows.IndexOf( rows ( counter))+2}.ToString

This is giving me “End of expression expected” error.

Below is a sample of what is required:

BOT should pick up row 3 and 5 for processing as ‘Status’ value is ‘NULL’ for them and after processing it should update ‘C3’ and ‘C5’ as ‘Pass’ or ‘Fail’. This is placed inside a Try Catch.

Name

Age

Status

VK

45

Fail

AK

15

KK

49

Fail

IK

13

Regards

Vikas

Hi,

You should be modifying the contents of the DataTable (dtCitrix) and then using Write Range to export the whole table back to Excel. This saves you the hassle of converting a row position to Excel coordinates manually.

Where are you using the Counter?

Did you try this way?
C + (dtCitrix.Rows.IndexOf(row)+2).ToString

1 Like

Thanks Vinay !

This seems to be working on the sample with a slight change “C” + (dtCitrix.Rows.IndexOf(row)+2).ToString

Will try on the actual BOT tomorrow and will let you know.

Thanks for your help.

Regards

Vikas

Hi Vinay

Just to update this is working fine. However, I have another issue at hand. The data is to be feeded to 2 applications, The “Successful” entries of the first application are the only ones to be feeded into 2nd. We were able to pick up Status as “Null” for 1st application now need to pick entries marked as “Success” under Status1 and also update Staus2 with Pass or Fail. Attached is a sample sheet wherein row 3 & 5 are required to be processed in 2nd application as Status1 is Success and cell D3 & D5 to be updated as Pass or Fail.

Test data.xlsx (14.9 KB)

Would it be possible for you to help on this please.

Thanks in advance.

Regards

VK

Hello friends

Is there a solution which can be suggested for my above query please?

Regards