Excel crashes while refreshing Power Query data when number of columns in source data reduces

Anonymní
2024-03-02T12:26:01+00:00

I have this peculiar issue.

I have a source data in XLSM format. This file is generated by download from a source where user can choose number of columns.

Then it is loaded into another file (XLSX) and processed via Power Query and multiple queries and few pivot tables generated from it. There is only limited number of column headings that are used in the queries and those are always present in the source file. Now, scenario:

  1. all queries and pivot tables are running fine, all refreshes, no errors, file saved
  2. prior to download a user selects for download one (or multiple) additional column(s) compared to the source data from step 1, refreshes everything, no error, saves the file
  3. same processing file from step 2. is used with another source data, but this time with less columns (as compared to data from step 2). Upon "Data>Refresh all" Excel crashes without any warning

I found that it is enough to run my queries on original set of data (step 1 or 2), save, then remove one column (pretty much any from the non-referenced ones) and re-run and it crashes. When I add a column (does not even have to have the same name = header and does not even have to have any data in the new column) the query again works. I tried clearing permission cache.I tried ’save source data with file’.I tried to remove any references to the removed columns from the pivot tables.... all to no avail.All the queries in Power query editor do refresh ok, no errors. "Close and load" no errors. But upon refresh in Excel it crashes without any warnings.

The only thing that I found works, is to re-create the file from scratch, with exactly the same queries as before (not a single letter changed in Advanced Editor), only this time with less columns in source data.

Interestingly, if source data has more columns than during the last save of the processing file everything works fine. Any suggestion how to fix this?

Note: running MS Excel 2016 on Windows 10 & 11

Microsoft 365 a Office | Excel | Jiné | Windows

Otázka je uzamčená. Tato otázka se migrovala z komunity podpory Microsoftu. Můžete hlasovat, jestli je užitečná, ale nemůžete k ní přidávat komentáře či odpovědi ani ji nemůžete sledovat.

Počet komentářů: 0 Žádné komentáře

Odpovědi: 2

Seřadit podle: Nejnovější
  1. Anonymní
    2024-03-03T06:34:41+00:00

    Hi,

    thank youf or the response.

    • all my queries were set to run in the background already
    • unticking the 'background refresh' did not help, still crashing
    • tried to clear and then increase the cache to max -> still crashing
    • no errors in formulas or references. Not using any lookups, only one index/match and that is working fine as far as I can check.
    • updating to different version not allowed (yet) by company policy :-(

    What else could I try?

    Byla tato odpověď užitečná?

    Počet komentářů: 0 Žádné komentáře
  2. Anonymní
    2024-03-02T15:47:40+00:00

    Hi TB1280,

    Thanks for contacting us and sorry for the inconveniences,

    Here are a few possible solutions that you can try to fix this issue:

    • Enable background refresh for your queries. This may prevent Excel from freezing or crashing when you refresh your data. To do this, you need to select Data > Queries & Connections > Connections tab, right click a query in the list, and then select Properties. Select the Usage tab. Select the Enable background refresh check box to run the query in the background. Clear this check box to run the query while you wait.
    • Increase the cache limits for your queries. This may improve the performance and stability of your queries. To do this, you need to click Settings > Options > Global > Data Load to expose the "Data Cache Management Options". Try increasing the Maximum allowed (MB) to 16000 (or about double what the current setting is).
    • Check your formulas for any errors or invalid references. This may cause Excel to crash or return an error value when you refresh your data. For example, if you use the HLOOKUP function, make sure that the row index argument is not less than 1.
    • Update your Windows and Excel to the latest version. This may resolve any compatibility or bug issues that may cause Excel to crash. You can check for updates in the Windows Settings app or the Excel Account tab.

    Let me know if this helps or if you need further assistance.

    Regards, Sola

    “Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below. “

    Kindly note that this is a user to user forum, we are users helping other users, we aren't Microsoft employee neither are we Microsoft agents.

    Byla tato odpověď užitečná?

    Počet komentářů: 0 Žádné komentáře