Skip excel record based on condition

Hi Friends,

Here is my scrapping data ;-

1 75645 MN 1 33.51 33.51

2 700 BN 11 35.16 35.16

3 1700 NC 12 35.16 35.16

From this we have to fetch ID value 1 ,11,12
and i have a excel file in that there is a column ID so here we have to match every fetch ID and excel ID
if scrape value 1 = excel value 1 — > skip that value
if scrape value 11 is not equal to excel value (consider in excel there is 32 value) then bot should pick only excel value i.e. 32

How to do this.

Regards,

hi @Rup_1,

  1. Take a string Array as Result and split the input using the Space .
    String result = “75645 MN 1 33.51 33.51”.Split(" "C);

This will output you an array of string
so , result[0] would be 75645
result[1] would be MN
result[2] would be 1

Direct way of getting the Same Value :
Split(“75645 MN 1 33.51 33.51”," ")(2) - This will Output 1

we will Take the result[2] for every input as we can see the index you require is in third place of string.

  1. Take a If condition and specify result[2].Trim.equals(“1”) and Do the Processing… — > skip that value


Mukesh