How to select the 2nd sheet of an excel file regardless of name

Is there a way to select the 2nd sheet of an excel file without specifying the sheet name?

My current solution is using If/Else but by doing so,
Condition: ExcelFile.Sheet(“2ndSheet”) contains “_Car”
If the ExcelFile doesnt have the specific 2ndSheet name, it will create it and make the condition true.

Thus, is there a way to specify the 2nd sheet like ExcelFile.SecondSheet or something like ExcelFile.CurrentFile?

Context:
There will be multiple files.
Trying to extract data from the 2nd sheet of an excel file but the name is always different.

@angelico_mdc,

Use Get Workbook Sheets activity. It’s a classic activity. It will give you array of string which will hold all sheet names.

Using array index 1 you can get second sheet.

Sample Code:


Main.xaml (16.9 KB)

1 Like