How to check if the name of the sheet in the list is in another Excel file

I did get the list of name of the sheet using GET Workbook sheets. After that, I want to check whether there is an Excel sheet in the list in the other Excel file and organize the activity using if.

But I don’t know how to do the find activity.

I would appreciate it if you could let me know the activity of finding out whether or not the sheet is in another Excel file using the sheet name list, or how.

If it’s on the list of sheet names but doesn’t have that sheet in another Excel file, I’d like to create a process to skip the action, and if there is, perform the action.

In your case - You already have the list of name of the sheets available in the first workbook

Do similar action for second excel file as well - Open the excel file and Get Workbook Sheets and store to a variable named as XlSheets_Destination

Now Start looping through the first List of sheets. You can use For Each activity

To check whether the current looping sheetname is available in the destination file - use below expression under if condition

XlSheets_Destination .contains(“YourSheetName”)

Hope it helps

Happy Automation

For reference:

ForumProject.zip (454.6 KB)

@sssim4567

Hello @sssim4567 ,

look at the below SnapShots for your solution :backhand_index_pointing_down:

Output of 1st get workbook = All_Sheets_1
Output of 2nd get workbook = All_Sheets_2

Let me know if this works, and don’t forget to mark it as solution.

Cheers!!!