Forum Discussion

UncleLewis's avatar
UncleLewis
Responsive Resident
4 years ago
Solved

Get Data From Folder - Same Sheet Name Question

Hi, Im using Power Query in Excel. Is it possible to Get Data >> From File >> From Folder when the the sheet in each file has different names? I keep trying, but I don't get the return I expect ...
  • BA_Pete's avatar
    4 years ago

    Hi UncleLewis ,

     

    If you only have one sheet in each file, but they have different names, then you can replace the sheet navigation step like this:

    // change your step that looks like this:
    Sheet = Folder{[Name = "Sheet Name"]}[Content]
    
    // to this:
    Sheet = Folder{0}[Content]
    
    // or this, depending on how you are importing the workbook:
    Sheet = Folder{0}[Data]

     

    You're basically just switching the hard-coded sheet name for any sheet that is at position 0 (the first sheet in a zero-base list) in the workbook.

     

    Pete