I need to read Excel sheet name inside the for loop one by one without opening Excel and using modern activity
Hi @sruthesanju ,
- Add “Excel Process Scope”: Use the “Excel Process Scope” activity.
- Set the file path of the Excel file you want to read.
- Use “Get Workbook Sheets” Activity:
- Inside the “Excel Process Scope”, add the “Get Workbook Sheets” activity.
- The output of this activity is a list of sheet names (e.g.,
List<String>
).
- Iterate Through Each Sheet Name:
- Use a “For Each” activity to loop through each sheet name in the list.
- For each sheet, you can perform actions based on the sheet name or simply display it.
How to do in workbook activity
Reading Excel sheet names are not possible with Workbook activity. We have to use Excel Activities
A workaround can be unzip xlsx and read workbook.xml
Inside XML you have sheet names
Hope it helps
1 Like