Title: Tables from Google Sheets
Last modified: June 23, 2020

---

# Tables from Google Sheets

 *  Resolved [carnetsdemontagne](https://wordpress.org/support/users/carnetsdemontagne/)
 * (@carnetsdemontagne)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/)
 * Hello,
 * I have several tables on my website that are linked to Google Sheets.
 * It was working well but since few days, these tables are empty (No available 
   data in this table) though I did not change my documents Google Sheets.
 * When I try to create a new table, I have an error message saying that my spreadsheet
   has no line.
 * Thanks in advance for your help
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftables-from-google-sheets%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [jeeni](https://wordpress.org/support/users/jeeni/)
 * (@jeeni)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13031523)
 * I have a similar issue and found your table working on your site page shared.
   Was it a fleeting issue or did you figure out a solution, [@carnetsdemontagne](https://wordpress.org/support/users/carnetsdemontagne/)?
 * Thanks in advance for sharing your experience.
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13031628)
 * Hi there,
 * After investigation, we found out that your link in converted in this after CURL
   call
 * <HTML> <HEAD> <TITLE>Temporary Redirect</TITLE> </HEAD> <BODY BGCOLOR=”#FFFFFF”
   TEXT=”#000000″> <H1>Temporary Redirect</H1> The document has moved here [https://doc-10-60-sheets.googleusercontent.com/pub/&#8230](https://doc-10-60-sheets.googleusercontent.com/pub/&#8230);..
 * The described behavior is a feature:
 * [https://developers.google.com/apps-script/guides/content#redirects](https://developers.google.com/apps-script/guides/content#redirects)
 * RedirectsFor security reasons, content returned by the Content service isn’t 
   served from script.google.com, but instead redirected to a one-time URL at script.
   googleusercontent.com. This means that if you use the Content service to return
   data to another application, you must ensure that the HTTP client is configured
   to follow redirects.
    What you can try is to add this code in file wp-content/
   plugins/wpdatatables/source/class.wdttools.php around line 205 you will find 
   this:
 * curl_setopt($ch, CURLOPT_REFERER, site_url());
 * and below that add this code
 * curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
 * We need to test more but for now it is working in all test cases.
 * Sorry for inconvenience,
 *  [danny1245](https://wordpress.org/support/users/danny1245/)
 * (@danny1245)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13031688)
 * Can confirm that code works. I was experiencing the exact same issue. Inserted
   that code, all google sheet tables work again.
 *  [jeeni](https://wordpress.org/support/users/jeeni/)
 * (@jeeni)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13031871)
 * Thank you!
 * Will your source code keep this update going forward or will we need to tweak
   the code after each new release? Thanks for the additional information.
 * Take care,
    Jean
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13032823)
 * Hi there,
 * Yes, this or corrected version of code (depends on testing) will be included 
   in next update you don’t have to worry about that.
 *  [jeeni](https://wordpress.org/support/users/jeeni/)
 * (@jeeni)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13034533)
 * Thanks again!
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13035573)
 * You are welcome.
 *  Thread Starter [carnetsdemontagne](https://wordpress.org/support/users/carnetsdemontagne/)
 * (@carnetsdemontagne)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13037681)
 * Hi,
 * [@jeeni](https://wordpress.org/support/users/jeeni/) Meanwhile, I tried to create
   a new document, copy and paste my table and generate a new link and it worked
   but only temporarily.
 * [@wpdatatables](https://wordpress.org/support/users/wpdatatables/) Thanks a lot
   for your help, it works !
 *  Plugin Contributor [ameliabooking](https://wordpress.org/support/users/ameliabooking/)
 * (@ameliabooking)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13040831)
 * .
    -  This reply was modified 5 years, 10 months ago by [ameliabooking](https://wordpress.org/support/users/ameliabooking/).
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13040836)
 * You’re welcome
 * If you have any further issues with the plugin, please feel free to reach out
   to us.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Tables from Google Sheets’ is closed to new replies.

 * ![](https://ps.w.org/wpdatatables/assets/icon-128x128.gif?rev=3010404)
 * [wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin](https://wordpress.org/plugins/wpdatatables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpdatatables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpdatatables/)
 * [Active Topics](https://wordpress.org/support/plugin/wpdatatables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpdatatables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpdatatables/reviews/)

 * 10 replies
 * 5 participants
 * Last reply from: [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/tables-from-google-sheets/#post-13040836)
 * Status: resolved