Excel Error Codes

Fix Excel's Invalid Document Error for OneDrive Data Sources

Olivia MillerOlivia Miller Dec 2, 2026 868 views

Question details

Resolve an Excel document recognition error when connecting to a data source stored on OneDrive.

Fix Excel's Invalid Document Error for OneDrive Data Sources
Product
Microsoft Excel and OneDrive
Device & OS
not provided
Scenario
A user connects an Excel workbook to an external data source stored on OneDrive, and the connection fails on one computer.
Observed behavior
Excel reports that the input could not be recognized as a valid Excel document on the affected computer.
Before you start

Identify the source file and its OneDrive location, then check whether it opens directly in Excel on the affected computer. Compare the source path and file format with those used on a computer where the connection works.

Solution 1Recommended

Check the source workbook format and reconnect

Use this approach if the connector may not recognize the source file's current format or the connection points to the wrong file.

1
Open the source file

In OneDrive, locate the source workbook and open it in Excel. Confirm that the file opens normally and contains the expected data.

2
Save in a supported format

In Excel, select File > Save As and save a copy in the format required by the data connector. If appropriate, try Excel 97-2003 Workbook (.xls); one user reported that converting from .xlsx to .xls resolved the error.

3
Reconnect to the saved file

In the destination workbook, select Data > Get Data > From File > From Workbook, choose the saved source file, and follow the prompts to load or transform the data.

4
Refresh the connection

Select Data > Refresh All and check whether Excel reads the source without the error.

Check the source workbook format and reconnect
Check XLS limitations: The older .xls format supports fewer rows and columns than .xlsx and may not retain all workbook features. Use it only if the data fits and the connector supports it.
Free Microsoft Office alternative

Open and edit Excel workbooks with WPS Spreadsheets

WPS Office is a free, lightweight alternative for working with spreadsheets in a familiar interface. It supports common Excel formats, making it easy to move existing files into WPS. It does not repair Microsoft Excel's OneDrive connection error.

Open and edit spreadsheet data in a familiar interfaceCompatible with Microsoft Excel formats including XLSX and XLSFree and lightweight for everyday office workMove existing Office files into WPS without starting from scratch
microsoft office alternative - wps office

Frequently Asked Questions

Why does the error appear on only one computer?

The affected computer may use a different source path, OneDrive account, sync state, or software version. Compare the query's Source step and account access with a computer where the connection works.

Will converting XLSX to XLS always fix the error?

No. One user reported success with that conversion, but the result depends on the connector and workbook. Use File > Save As to create an XLS copy only if the data and features fit the older format.

How can I check which file an Excel query uses?

Select Data > Queries & Connections, edit the affected query, and inspect its Source step. Verify that the path points to the intended workbook.

What if the OneDrive source does not open directly in Excel?

Check that you are signed in to the correct OneDrive account and have access to the file. If you use a synced folder, confirm that the file is available locally, then try opening it again.