Why Excel Power Query Redirects to Sign-In for a Private Google Sheet API Key
Question details
The user needs to understand why an OData.Feed connection that includes an API key redirects to Google sign-in instead of returning data from a private Google Sheet.

- Product
- Microsoft Excel Power Query and Google Sheets API
- Device & OS
- not provided
- Scenario
- The user is trying to connect Excel Power Query to a private Google Sheet through an OData.Feed URL that includes an API key.
- Observed behavior
- The connection redirects to Google sign-in and does not return the private Google Sheet data.
Confirm whether the target Google Sheet is private and whether your current URL is an OData.Feed address that includes only an API key. Open the Google Sheets API documentation and your Google Cloud Console project so you can create the correct OAuth 2.0 credentials or service account before changing the connection in Excel.
Use the Google Sheets API endpoint with OAuth 2.0 or a service account in Power Query
Choose this method when you need data from a private Google Sheet and an OData.Feed URL with an API key returns a Google sign-in page instead of data.
An API key identifies your Google Cloud project but does not prove that you have permission to read a private Google Sheet. Google Sheets is not an OData feed, so OData.Feed cannot authenticate the request correctly.
Power Query can consume the JSON response from the Google Sheets API, but you must authenticate with OAuth 2.0 or a service account that has access to the sheet.
Open console.cloud.google.com, create or select a project, go to APIs & Services > Library, search for Google Sheets API, and click Enable.
Go to APIs & Services > Credentials, click Create Credentials, and choose OAuth client ID for user sign-in or Service Account for automated access. If you use a service account, share the private Google Sheet with the service account email.
In Excel, select Data > Get Data > From Other Sources > From Web to open the Power Query web connector.
Enter the Google Sheets API v4 endpoint, for example https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{sheetName}!{range}, replacing the placeholders with the private sheet's ID, sheet name, and range.
In the Power Query authentication dialog, choose the appropriate web authentication method, sign in with the authorized Google account, and accept the Google consent screen.

Check sharing permissions and use a published CSV link only if the data can be public
Use this option when a private sheet cannot be exposed through the API or when you need a quick, read-only connection for non-sensitive data.
Skip Excel Power Query authentication issues by opening Google Sheets exports in WPS Office
WPS Office is a free, lightweight Microsoft Office alternative with full compatibility for Excel workbooks and CSV exports. When Google Sheets API authentication becomes too complex, export the sheet and open it in WPS Spreadsheets with a familiar ribbon interface and no API key or OAuth redirect.
- 1. Export the private Google Sheet as an Excel or CSV file: In Google Sheets, select File > Download > Microsoft Excel (.xlsx) or Comma-separated values (.csv) to save a copy to your computer.
- 2. Download WPS Office Free: Go to the official WPS Office website, click Download, and install WPS Office on Windows, macOS, Linux, Android, or iOS.
- 3. Open the exported file in WPS Spreadsheets: Launch WPS Office, click Spreadsheets, then open the .xlsx or .csv file you exported from Google Sheets.
- 4. Edit and save with Excel-compatible formatting: Use the familiar ribbon tools to review, edit, and format the data, then save the file as .xlsx to keep Microsoft Excel compatibility.

Frequently Asked Questions
Why does my Excel Power Query OData.Feed URL with an API key redirect to Google sign-in?
Because Google Sheets is not an OData feed, and an API key alone does not authorize access to private sheet content. Google requires OAuth 2.0 or a service account to authenticate requests to the Google Sheets API.
Can I connect Excel Power Query to a private Google Sheet without OAuth?
For private sheets, no supported API access works without proper authorization. You can use OAuth 2.0 with an authorized Google account or a service account that has been shared on the sheet.
Which URL should I use instead of an OData.Feed URL?
Use the Google Sheets API v4 endpoint, such as https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{sheetName}!{range}, and authenticate in the Power Query web connector.
Does WPS Office support Power Query connections to Google Sheets?
WPS Office is a free Microsoft Office alternative and does not provide Excel Power Query. However, you can export the Google Sheet as .xlsx or .csv and open it directly in WPS Spreadsheets.
What should I check if the Google Sheets API still returns a sign-in page after switching?
Check that the Google Sheets API is enabled in Google Cloud Console, the OAuth consent screen is configured, the signed-in Google account has access to the sheet, and the endpoint URL uses the correct spreadsheet ID and range.




