I’m trying to create a table with Google spreadsheet but I get the error message “Table in data source has no rows.”?We encounter this issue recently and it looks like that the URL link that you get when you publish the document is not valid. (contain 2PACX in URL) So can you please use the URL link that you get from the browser and see if the issue is gone.By Milan Jovanovic on 23/07/18 in
Hello all wpDataTables users!
Google changed their API, and almost all tables created in Creating Tables in WordPress from Google Spreadsheets are affected.
The issue is displayed either as a “Table in the data source has no rows” error when trying to create a new table, or “No data available in the table” in an existing table.
There is a temporary workaround for the issue until we resolve it for good.
What you need to do in your Google sheet is to share this sheet with everyone.
When you visit your already published sheet, click on the “Share” button in the top right corner of your sheet:
On the modal that pops up, click on “Change to anyone with link text“:
After that, your tables will show up again like ours did in our documentation on this link.
Sorry for the inconvenience, and thank you for your patience!
This issue can occur for several reasons:
- You’ve copied the URL from the “Publish to the web” modal that pops up when you publish the spreadsheet:These links are recognized easily because they all contain “2PACX”:After the spreadsheet is published, just close that modal window that opens up, and copy the URL from the browser’s address bar and paste it into wpDataTables corresponding URL field when creating a table linked to an existing Google Spreadsheet file:
- You don’t have ZipArchive installed on your server, or you’re using an older version of ZipArchive. Please reach out to your hosting provider and ask them to either install or update the ZipArchive.
- The data in the Google Spreadsheet file is not structured correctly. Please remember that wpDataTables cannot import tables from other sources that contain merged cells; sub-headers; multiple empty rows below the first row. Also, keep in mind that the first row in your Google Spreadsheet file needs to contain column headers and that all data should be entered in columns below those headers.
- Applying any formatting in the file, like custom collation, Google Spreadsheet formulas, IMPORTRANGE functions, custom colors, etc. may cause an issue like this.
- If the Google account from which you’ve created the Spreadsheet is a part of a business (G-Suite), publishing may be allowed, but due to security measures it is not visible (accessible) from wpDataTables.
You can find more details in our documentation about Creating Tables in WordPress from Google Spreadsheets