Multiple sheet in excel

I have two excel sheets in a workbook. I have used Range Range activity to read both the sheet.
Now by using conditions i want to use a sheet which has data sometimes it may be sheet 1 which may have data, or sometimes it may be sheet 2.
Can we use here Switch activity?


I believe you donot know which sheet has value…

So betterread both the sheets and then use dt.Rowcount to check if the read data has rows or not and accordingly use the sheets data…

Dt.rowcount>0 is what you would check


Hi @Ak_4,

After using Get Workbook Sheets, you can loop over output array,
use read range for current sheet, and check if datatable (output of read range) has more than 0 rows, once you found the sheet having more than a row, break the loop…

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