In case anyone is looking at this and has the same question, I finally found the answer:
It is a problem with metadata that is incorrectly added sometimes when you do an export to Excel from other programs. The dimensions attribute gets messed up and tells PowerQuery that your data is a lot smaller than it really is by providing an incorrect start and end cell. In my case it was showing only 1 column and 5 rows.
There are a few solutions to this:
- fix the export to not mess this up
- simply resave the exported file once you export it (what I'm doing)
- edit the M query to tell it not to trust the sheet dimensions metadata and figure it out for itself (InferSheetDimensions = true)
For the last option, I only see examples of how to do it for an individual file rather than when pulling in a whole folder of files but maybe that's possible somehow, too.
Here's a link to the solution:
https://docs.microsoft.com/en-us/power-query/connectors/excel#troubleshooting