Excel data extract

Hello to all,

Need small help, I need to run the whole process for EUR and if the local currencz is present then for that as well and if not then it should move to the next row.image Suggestions please

HI @kartik_sareen

You can follow the below steps.

Read Range to read the excel to a data table
For Each Row in DT
     IF row("Curr").ToString.Equals("EUR")
          -- Process for EUR comes here
     End IF
     IF Not String.isNullOrEmpty(row("local curr").ToString)
          -- process for local currency comes here
     End IF
End FOR

Let know if this helps

1 Like

Thank you for the reply, actually I need all the other values as well for ex(JED, JHRGD,EUR, ), in this I need all the values in my process. But the process will take EUR from it and then whole proces. Once it fininsh the process it checks for the local curr, if its thr then same process and if not then end the process and go to the next row.Fetchz the second row

Hi @kartik_sareen,
Can you explain little broader?

Int ProcessIdentity = 1; -- Describes whether to process Curr or local curr
While ProcessIdentifier <= 2
Begin
	For Each Row in DT
		IF ProcessIdentifier == 1
			IF row("Curr").ToString.Equals("EUR") -- Have multiple conditions here or you can remove the condition
				  -- Process for EUR comes here
			End IF
		End IF
		IF ProcessIdentifier == 2
			IF Not String.isNullOrEmpty(row("local curr").ToString)
				  -- process for local currency comes here
			End IF
		 End IF
	End FOR
	ProcessIdentifier = ProcessIdentifier + 1
End While

Try this logic…

1 Like
  1. Extract the first row from the excel which will be ( JED, JHRGD, EUR, )
  2. We will have the above values stored in an array.
  3. So, first we need EUR , may be that could be row(2) and then later in the process I would need row(1) that is JHRGD alter in the process.
  4. Once the process is finished for EUR, we need to check if we have row(3) is empty or not, if not then the same process will follow for that value and if nothing then end process.
    I hope its clear now

You want to swap with the before value until there is an empty value?

is it possible to extract the whole first row …

Yes you can keep in the for each row and extract a row based on some condition that you give

Then break the loop after first iteration…