Title: How to import tables from Google Sheets
Author: Tobias Bäthge
Published: January 23, 2024
Last modified: September 18, 2025

---

Importing table data from external spreadsheet sources

# How to import tables from Google Sheets

TablePress can import tables from a variety of popular spreadsheet applications.
This includes XLSX files from Microsoft Excel, CSV (Character-Separated Values),
ODS (OpenDocument Spreadsheet), HTML, and JSON files. In addition to uploading files
from your local computer, it is also possible to import spreadsheets into your WordPress
site by providing a URL (link address) to such a file.

**This opens up the possibility to import a table from a [Google Sheets](https://www.google.com/sheets/about/)
table into TablePress.** (By the way: The [TablePress Max license plan](https://tablepress.org/pricing/)
comes with the [Automatic Periodic Table Import feature](https://tablepress.org/modules/automatic-periodic-table-import/).
This allows you to fully automate the table import process, saving you time and 
effort!)

All that you need for this is a link address to the spreadsheet that directly returns
an appropriate file, without any user interface or login screen. This can be done
by publicly sharing the Google Sheet and then using a generated (secret) URL for
the import into TablePress. **Our beginner-friendly step-by-step tutorial will guide
you through this process and show you how to find this URL for your Google Sheets
table.**

## Step 1: Open your Google Sheet

Go to the [Google Sheets](https://docs.google.com/spreadsheets/) website and sign
in to your Google account, if you are not yet logged in. Create a [new spreadsheet](https://spreadsheet.net/)
or open an existing one that contains the table you want to share.

## Step 2: Share the Spreadsheet

Click the “File” menu (1), choose “Share” (2), and click “Share with others” (3).
Alternatively, click on the “Share” button in the top-right corner of the screen,
if that’s shown.

![Opening the "Share with others" dialog in Google Sheets.](https://tablepress.org/
wp-content/uploads/2024/01/google-sheets-share-menu.png)

Opening the “Share with others” dialog in Google Sheets.

In the “Share” dialog, click on the “Restricted” (1) dropdown menu next to the lock
icon. Choose “Anyone with the link” (2) from the dropdown menu. The access level
in the Permissions dropdown on the right should be left as “Viewer”.

![Sharing a Google Sheet to "Anyone with the link".](https://tablepress.org/wp-content/
uploads/2024/01/google-sheets-share-dialog.png)

Sharing a Google Sheet to “Anyone with the link”.

After configuring the sharing settings, click the “Copy link” button (1) in the 
bottom-left corner of the dialog. You will now have the Sharing link for the Google
Sheets user interface in your computer’s clipboard.

![Copying the Sharing link address from the "Share" dialog of Google Sheets.](https://
tablepress.org/wp-content/uploads/2024/01/google-sheets-share-link.png)

Copying the Sharing link address from the “Share” dialog of Google Sheets.

## Step 3: Obtaining the Sharing URL

Open a new browser tab and paste the copied link into the address bar. The link 
looks like

    ```language-plaintext
    https://docs.google.com/spreadsheets/d/{spreadsheet-id}/edit?usp=sharingCode language: plaintext (plaintext)
    ```

where `{spreadsheet-id}` is an ID of your sheet, consisting of a long sequence of
letters and numbers.

Now, choose the desired data transfer format that you want to use, between `xlsx`
and `csv`:

 * If your Google Sheet contains basic formatting (like text or numbers in boldface,
   italics, or with text colors) or clickable links, choose the `xlsx` format (Microsoft
   Excel).
 * If your Google Sheet does not contain formatted data (or if you don’t want that
   format to be imported or if the import then produces undesired results), choose
   the `csv` format (Character-separated Values). The `csv` format is usually more
   reliable.

The chosen format then has to be added to the copied Sharing URL. For that, in the
address bar, replace the `/edit?usp=sharing` at the end

![The Editing URL "https://docs.google.com/spreadsheets/d/{spreadsheet-id}/edit?
usp=sharing" for a Google Sheet in the browser address bar, with /edit?usp=sharing
at the end.](https://tablepress.org/wp-content/uploads/2024/01/google-sheets-url-
edit.png)

with `/export?format=xlsx` or `/export?format=csv` (depending on the chosen format),
like this:

![The Sharing URL "https://docs.google.com/spreadsheets/d/{spreadsheet-id}/export?
format=csv" for a Google Sheet in the browser address bar, with /export?format=csv
at the end.](https://tablepress.org/wp-content/uploads/2024/01/google-sheets-url-
export.png)

Copy that modified URL, which now looks like

    ```language-plaintext
    https://docs.google.com/spreadsheets/d/{spreadsheet-id}/export?format=xlsxCode language: plaintext (plaintext)
    ```

for the `xlsx` format or like

    ```language-plaintext
    https://docs.google.com/spreadsheets/d/{spreadsheet-id}/export?format=csvCode language: plaintext (plaintext)
    ```

for the `csv` format.

That’s it! You now have a link address that can be used for importing the Google
Sheets table into TablePress.

**A quick tip:** To check if a URL link is suitable, try opening it in a “private”/”
incognito” browsing window. If you are offered an `xlsx` or `csv` file for download,
without seeing a spreadsheet user interface or having to log in first, the URL should
work for the import into TablePress.

## Step 4: Selecting a different worksheet (optional)

By default, the generated link address from above will return the first worksheet
of a Google Sheets workbook. Sometimes, a Google Sheet workbook might contain more
than one sheet:

![Selecting a different worksheet from a Google Sheet workbook with multiple sheets.](
https://tablepress.org/wp-content/uploads/2024/01/google-sheets-different-sheet.png)

Selecting a different worksheet from a Google Sheet workbook with multiple sheets.

If you would like to import a different worksheet, you will have to find its `gid`
identifier. This is shown at the very end of the browser address bar when that worksheet
is open and looks like `/edit#gid=1234567890` with some very long number.

![The Editing URL "https://docs.google.com/spreadsheets/d/{spreadsheet-id}/edit#
gid={gid}" for a Google Sheet in the browser address bar, with /edit#gid=1234567890
at the end.](https://tablepress.org/wp-content/uploads/2024/01/google-sheets-url-
gid-1.png)

Copy the `gid=1234567890` part and append it, separated by an ampersand `&`, to 
the Sharing URL from Step 3 (either with `xlsx` or `csv` as the format):

    ```language-plaintext
    https://docs.google.com/spreadsheets/d/{spreadsheet-id}/export?format=csv&gid={gid}Code language: plaintext (plaintext)
    ```

This extended Sharing address will now directly return the desired worksheet of 
that Google Sheets file.

## Step 5: Import the URL into TablePress

Once you have the correct Sharing URL from Step 3 (or Step 4, if you would like 
a specific worksheet), you can use that for importing the Google Sheet into TablePress.
For that, go to the “Edit” screen of TablePress on your WordPress site. Choose “
URL” as the “Import Source” and paste the URL into the “File URL” text field. After
clicking the “Import” button, your Google Sheets table will be imported into TablePress.
You can then edit it as needed and show it on your site by embedding the “TablePress
table” block (if you are using the block editor) or the corresponding Shortcode 
into a post or page.

![Importing a TablePress table from the generated Sharing URL of a Google Sheets
worksheet.](https://tablepress.org/wp-content/uploads/2025/09/google-sheets-import-
tablepress.png)

Importing a TablePress table from the generated Sharing URL of a Google Sheet.

Note that (just like any other file import in TablePress) this is a one-time import.
There is no **automatic synchronization with changes in your Google Sheet**! However,
there is a great solution for that as well: **The [TablePress Max license plan](https://tablepress.org/pricing/)
comes with the [Automatic Periodic Table Import feature](https://tablepress.org/modules/automatic-periodic-table-import/).**
This module can periodically import your tables periodically (e.g. every minute,
every hour, etc.). Not only does this help you save a lot of time by not having 
to repeat the import task manually, but it also allows other people to update tables
on your website, e.g. by using a shared Google Sheet for data editing.

---

**By the way: This process also works with files uploaded to Google Drive!** To 
open the Sharing dialog, just right-click on the file in Google Drive and find the“
Share” entry. Then, follow the steps above.

Tutorials on how to create such a URL for other services like [Microsoft Excel Online](https://tablepress.org/tutorials/import-microsoft-excel-online/),
[Microsoft OneDrive](https://tablepress.org/tutorials/import-microsoft-excel-online/#microsoft-onedrive),
or [Dropbox](https://tablepress.org/tutorials/import-dropbox/) are available on 
the [Tutorials, Guides, and How-tos page](https://tablepress.org/tutorials/).

---

**Another remark:** Google Sheets also offers a “Publish to Web” feature that can
be used to create similar Sharing URLs, that look like

    ```language-plaintext
    https://docs.google.com/spreadsheets/d/e/2PACX-{workbook-ID}/pub?gid={sheet-ID}&single=true&output=csvCode language: plaintext (plaintext)
    ```

However, we do not recommend using this “Publish to Web” feature to import tables
into TablePress! The generated URLs will work, in general. However, they tend to
load much slower than the URLs generated via the regular “Share” feature that is
described in the steps above. This increases the risk of timeout errors, especially
when multiple imports are run.

**On this page**

 1. [Step 1: Open your Google Sheet](https://tablepress.org/tutorials/import-google-sheets/#step-1)
 2. [Step 2: Share the Spreadsheet](https://tablepress.org/tutorials/import-google-sheets/#step-2)
 3. [Step 3: Obtaining the Sharing URL](https://tablepress.org/tutorials/import-google-sheets/#step-3)
 4. [Step 4: Selecting a different worksheet (optional)](https://tablepress.org/tutorials/import-google-sheets/#step-4)
 5. [Step 5: Import the URL into TablePress](https://tablepress.org/tutorials/import-google-sheets/#step-5)