Power Query in Excel: Importing data from a folder but some files won't expand all columns with "expand table columns"

Anonymous
2022-05-04T20:36:20+00:00

Hello, all.

I am pulling data in from a folder full of spreadsheets. Everything was working fine until I got my latest batch of files. All the files I have ever used are the exact same exports from JIRA so the columns for all of them are identical. Someone compared a new and old export and confirmed that the column names all seem identical. I had been able to add new files and even updated versions of the same files to the folder and everything worked fine. But now I have newer, updated versions and it doesn't work!

What happens with my old files:

  • Expand table column and all columns from the spreadsheets show up

What happens with my new files:

  • Expand table column and only the first column from the spreadsheets shows up

I am stumped. Does anyone have any idea what on earth could be going on and how to fix it???

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2022-05-09T20:18:42+00:00

    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

    8 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Ashish Mathur 101K Reputation points Volunteer Moderator
    2022-05-04T23:10:14+00:00
    0 comments No comments
  2. Anonymous
    2022-05-06T21:20:40+00:00

    This doesn't speak to my issue at all, unfortunately. My issue is that when I get to the step of creating the custom column that is supposed to contain all of the data from my spreadsheets and I expand that column, it only shows ONE of the many columns in my spreadsheets.

    The issue I need help with is what could be causing it to only find the first column.

    Thanks.

    0 comments No comments