Forum Discussion
Get Data From Folder - Same Sheet Name Question
- 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
Hi UncleLewis
It is because the sheet name is hardcoded with the sheet name from the sample file. You can try BA_Pete 's solution if you have only one sheet in each file. You only need to modify the Navigation step in Transform Sample File query.
Modify
Source{[Item="R1", Kind="Sheet"]}[Data]
into
Source{0}[Data]
If you have more than one sheets in each file and you only want to import data from the sheet whose name starts with "R", you can modify the Navigation step into
= Table.SelectRows(Source, each Text.StartsWith([Name], "R")){0}[Data]
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.