Power Query Problems

Fix Excel Power Query DataFormat.Error When Refreshing SharePoint Workbooks

Maira MehtabMaira Mehtab Nov 12, 2026 869 views

Question details

The user needs to resolve a DataFormat.Error that appears when Excel Power Query refreshes data from a SharePoint workbook.

Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
A query connects to an XLSX file stored on SharePoint and is refreshed while the source workbook may be edited, saved, or temporarily locked.
Observed behavior
Power Query reports that the input is not a valid Excel document, often because it received an incomplete, temporary, inaccessible, or corrupted file.
Before you start

Open the SharePoint source location and confirm that the query points to the intended .xlsx file, not a temporary or similarly named file. Check that the workbook has finished saving and that you can download and open it normally before refreshing.

Solution 1Recommended

Wait for SharePoint to finish saving, then refresh the Power Query connection

Use this first when the error occurs during active editing, AutoSave, or a recent upload of the source workbook.

Power Query can read an incomplete workbook while SharePoint or Excel is still saving it. Waiting for the source file to finish syncing often restores a valid XLSX response without changing the query.

1
Check the source workbook status

In SharePoint, open the document library containing the source file and verify that the workbook is not being edited, uploading, or showing a pending sync status.

2
Wait for the save to complete

Close the source workbook or wait until its AutoSave and SharePoint sync activity finishes, then confirm that the file's modified time is stable.

3
Refresh the query again

In Excel, open the Data tab, select Refresh All, and wait for the Power Query connection to reload the SharePoint workbook.

Retry after saving completes: If the refresh succeeds after the source workbook is no longer locked, the error was most likely caused by a temporary or incomplete file response.
Free Microsoft Office alternative

Switch to WPS Office for Reliable XLSX Workbook Editing

WPS Office is a free, lightweight Microsoft Office alternative for opening, editing, and saving XLSX workbooks with a familiar interface. It supports common Excel formats, making migration straightforward when you need to review or maintain SharePoint files without the full Microsoft Office suite.

  1. 1. Install WPS Office: Download and install WPS Office, then launch WPS Spreadsheets from the Start menu or Applications folder.
  2. 2. Open the SharePoint workbook: Download the completed XLSX file from SharePoint and select Open in WPS Spreadsheets to inspect or edit the source workbook.
  3. 3. Save in Excel format: Choose File > Save As, select the .xlsx format, and save the completed workbook back to the appropriate SharePoint folder.
Open and edit XLSX workbooks with a familiar spreadsheet interface.Lightweight installation for reviewing source files before a data refresh.Maintain compatibility with Microsoft Excel XLSX files during migration.Work with common DOCX, PPTX, and XLSX Office formats in one suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query say the SharePoint input is not a valid Excel document?

The source workbook may still be saving, locked, partially uploaded, temporarily unavailable, or corrupted. Wait for SharePoint synchronization to finish, then confirm that the file opens normally and refresh the query again.

How can I make sure Power Query selects the correct SharePoint file?

Open Data > Queries & Connections, edit the query, and inspect the Source step. For a SharePoint folder connection, filter the Name and Extension columns to the exact workbook and exclude temporary files such as ~$ files.

Can AutoSave cause a DataFormat.Error during a Power Query refresh?

Yes. AutoSave or SharePoint synchronization can briefly expose an incomplete file while Power Query is reading it. Refresh after the workbook finishes saving or use a staging folder containing only completed files.

What should I do if the downloaded SharePoint workbook will not open?

The source file may be damaged or incomplete. Download it again after the upload finishes, try opening it in Excel or WPS Spreadsheets, and replace or repair the workbook if it shows corruption warnings.