How to Fix Power Query Cannot Change a Windows File Path on Mac
Question details
The user is unable to update a Power Query source file path after moving an Excel workbook from Windows to Mac, resulting in an unsupported gateway error.

- Product
- Microsoft Excel
- Device & OS
- macOS
- Scenario
- Migrating an Excel workbook containing Power Query connections from a Windows environment to a Mac environment.
- Observed behavior
- Attempting to change the Windows file path on macOS triggers an error requesting an on-premises data gateway, which is unsupported on Mac.
Verify that the new source file is saved locally on your Mac's hard drive and that you know its exact macOS file path structure before modifying the query.
Update the Data Source Path and Check Connection Compatibility
Manually update the Windows-formatted file path to a macOS-compatible path and ensure the connection type does not require a Windows-only data gateway.
Windows and macOS use entirely different file path structures. Windows uses drive letters and backslashes (e.g., C:\Folder\File.xlsx), whereas Mac uses root directories and forward slashes (e.g., /Users/Username/Folder/File.xlsx). Because Excel for Mac has limited Power Query connector support, failing to update this path correctly can mistakenly trigger an on-premises data gateway error.
In Excel for Mac, navigate to the 'Data' tab on the ribbon. Click on 'Get Data (Power Query)' to launch the Power Query Editor.
Select the query that is currently failing. Look at the 'Applied Steps' pane on the right side of the window and click on the 'Source' step.
In the formula bar at the top, replace the old Windows file path with the correct Mac file path. Ensure you use forward slashes (/) instead of backslashes (\).
Ensure you are connecting to a supported local file type (like Excel workbooks or CSVs). If the query relies on a connector not supported on Mac (like SQL Server without proper drivers), the gateway error will persist.

Consult the Power Platform Community
Seek specialized assistance from Microsoft's Power Query experts if the gateway error continues after updating the file path.
Experience Hassle-Free Cross-Platform Spreadsheets with WPS Office
If you frequently encounter complex gateway errors and feature limitations when moving Excel workbooks between Windows and Mac, consider trying WPS Office. It provides a highly compatible, lightweight alternative that handles standard spreadsheets effortlessly across different operating systems without relying on convoluted background data gateways.
- 1. Download WPS Office: Visit the official WPS Office website and download the correct installer for your Mac or Windows PC.
- 2. Install the Application: Run the downloaded installation file and follow the on-screen prompts to complete the setup.
- 3. Open Your Workbooks Seamlessly: Launch WPS Spreadsheets and open your existing .xlsx files directly, enjoying smooth cross-platform compatibility.

Frequently Asked Questions
Why does Excel for Mac ask for an on-premises data gateway?
Excel for Mac has limited support for certain data connectors that function perfectly on Windows. When Power Query detects a connection type or file path it cannot resolve locally on macOS, it often defaults to throwing a generic error requesting a Windows-based on-premises data gateway.
How do I format a file path for Mac in Power Query?
Unlike Windows, which uses drive letters and backslashes (e.g., C:\Data\file.xlsx), macOS uses a Unix-based file system with forward slashes. You must manually format your path to reflect your Mac's structure, typically starting with /Users/YourUsername/ (e.g., /Users/Name/Documents/file.xlsx).
Can I use all Power Query features on Excel for Mac?
No. While Microsoft is continually updating Power Query for Mac, it currently lacks several advanced data shaping capabilities and specific data connectors that are fully supported in the Windows version of Excel.




