I want to check empty in excel file

hello
i want to check Empty Row in excel
when i use For each row in Data table for loop insert Data to sap
i want to check column “SoldTo” step by step if empty give data in column “Material” insert To SAP
if Not Empty Go to next Process

Hi @TOPs.TH,

Welcome to the automation community!! :slight_smile:

Please follow the if loop mentioned in the attached image to get your query resolved. Let me know if you need more help. If this resolved your issue mark this as a Solution.

1 Like

@TOPs.TH

Welcome to forums

You can write as below

row("SoldTo).ToString <>"" OR row("SoldTo") <> Nothing

Then you can define your steps

Hope this may help you

Thanks

2 Likes

Hi,

If you have null reference error, the following condition might be better.

row.Item("SoldTo") isnot Nothing AndAlso (not String.IsNullOrEmpty(row.Item("SoldTo").ToString))

Regards,

1 Like

Thank you for your solution

and i want to check from second row in first Step

what can i do

thank you

Hi @TOPs.TH ,

Please add condition to skip the first row. One way of doing it is.

  1. Even before for each row activity, Add one assign activity. In TO create a variable by name rowNumber and assign value 1.
  2. Inside for each row, Add if condition, to check if row value is equal to 1. If yes you can skip the row.
  3. Inside the else part of the if loop place the current if condition. Let me know if you want me to make a work flow for the same.

Happy automation :slight_smile:

Hi sharath
Thank you so much
Pleas make a work flow for the same