How to check if a sheet exist in excel file

In your excel application scope you can use the “Get workbook sheets” activity. Save the output to a list<string> variable I’ll call xlSheets. Then in your if statement it should be if xlSheets.contains(“YourSheetName”)

I see your edit now, it looks like you already tried this. The above code works fine for me, can you do a for each loop over your list of strings and use write line to output the results? Make sure the output is what you expect

8 Likes