How To Get The Sheet Name From Excel in UiPath

Excel is the most used application in the business process automation.

To work with it, we might sometimes want to know the sheets available in it, let us see how to find all the sheet names available in a workbook.

wb as WorkbookApplication


Implementation using UiPath :

Let us implement a workflow which takes a sample excel file and displays all the sheets available in it.

Step 1:
Drag “Excel Application Scope” activity into the designer panel and supply the following values into the activity’s properties panel

WorkbookPath: “Sample_Excel.xlsx” (String type)
Workbook: myWorkbook (WorkbookApplication type)


Uploading: image.png(1)…

Step 2:
Drag “For Each” activity into the designer panel and supply the values to it as shown below.


Use “ Message Box ” to display the sheets.


Step 3:
Now, execute the project!!!


Hope it has helped you…

Happy Learning!!!

1 Like