Select a "sheet" with "if"

What i want i my process is when the data table is in “sheet1” then do the process 1 even if the data table is in the 'sheet2" then do the process 2

@Soudios

Sorry didn’t get you. Can you please tell more details for better understanding.

Do both Sheet1 and Sheet2 exist at the same time? If so, you’ll have to get the contents from each of them, and see which one has the data. Then use the if-condition to run the appropriate sequence.

The process is different if it’s sheet 1 or sheet 2
image

@Soudios

  1. Use Excel Application Scope and pass that excel file path to it.

  2. Use Read Range activities inside Excel Application Scope to read the data from excel sheets. Let’s say InputDT1 and InputDT2.

    If InputDT1.Rows.Count > 0
    Then
    Sheet1 contains data
    Else
    Sheet2 contains data

1 Like

Thank you!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.