Looking through Excel Files in a File Directory to get First Sheet Name Not Working

Hi All - I am working through a bit where I need to process a bunch of Excel files in a given Directory. I’ve Followed the advice offered here: Loop through a folder filled with excel files and Vlookup to a main spreadsheet

I can’t get this working in my scenario, the sequence just hangs, and never times out. NOTE - there are only 3 files in the directory I’m testing, max 2-3 tabs per sheet.

What I created was the following:

  1. Assign a variable to the file directory
  2. For Each File in the directory - Find the Excel Files
  3. Excel Application Scope - Output workbook “wb” in order to use in the next step to dynamically get the sheet name
  4. Message with the name of the sheet. (At the moment for testing, ultimately the next steps would be to read/write range from the first sheet of each workbook.) Right now I just want to make sure the looping is working.

I made sure the sheet names step is outside of the wb Excel application scope per forum posts I found. What am I missing here?

Here’s what the sequence looks like:

Hi there @NEdmonds

You are halfway there.

Inside your excel application scope just use the activity ‘Get workbook sheets’ and in that collection (output list of sheet) the first item will be your first sheet. Try and revert if issue still persists :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.