Can't dynamically retrieve sheet name with ReadRange (Workbook) activity?

Hello
I am using StudioX 2024.10.14 LTS.

  1. What I want to do

I want to dynamically retrieve the sheet name using the ReadRange (Workbook) activity.

  1. What I’m struggling with

After assigning the file list of the specified folder to the string array arr_Path, I tried to get the sheet name into str_SheetName using the ExcelGetWorkbookSheet activity inside the ForEach activity, and then open str_SheetName with the ReadRange (Workbook) activity, but I received an error saying the sheet does not exist. When I use a fixed value like “Sheet1”, it opens without any issues.

Is it not possible to dynamically retrieve the sheet name using the ReadRange (Workbook) activity?

@gorby

You can’t retrieve dynamic sheet name directly from ReadRange (Workbook) activitiy.
You will have to get all the sheet names using Get Workbook Sheets activity and then you can pass the sheet from the output array of sheet names. This is the only option you got.

Activities - Get Workbook Sheets