Plugin Author
Meitar
(@meitar)
You have the right idea with the gid parameter but you’re not using the right values. Google doesn’t reference individual sheets sequentially. The second sheet is not necessarily 2. It might be, but it might not be.
If you’re using a recent version of the plugin and the new Google Sheets (and it looks like you are), you can just copy and paste the URL you use to edit the specific sheet and the plugin will extract the correct value for the gid attribute automatically. Otherwise, you need to inspect the URL yourself and find what the sheet’s ID number is. It’s always going to be after the gid= part of the URL, so whatever number comes after that in the URL is the value you want to put into the gid attribute.
Hope this helps.
I sort of understand. The URL to the next page is as follows:
https://docs.google.com/spreadsheets/d/1Li3u1KRumHqWPvuWFrNYxso0ODRbyDQ3WZlvDYCU2hA/edit#gid=1388495398
Would I put all of those numbers in the gid=”numbers” code?
I just tried it and it worked! 🙂
Thank you so much. I thought it was just one number instead of a string of values in the URL.
Great plugin and great customer service!
Plugin Author
Meitar
(@meitar)
🙂 Glad you got it working.
For future reference, yes, for the sheet you’re trying to embed that has the URL you mentioned, one could either use the gid attribute explicitly, like this:
[gdoc key="https://docs.google.com/spreadsheets/d/1Li3u1KRumHqWPvuWFrNYxso0ODRbyDQ3WZlvDYCU2hA/edit" gid="1388495398"]
or you can just use the URL in its entirety, which includes the gid attribute supplied by Google, and not use the gid attribute in the shortcode, like this:
[gdoc key="https://docs.google.com/spreadsheets/d/1Li3u1KRumHqWPvuWFrNYxso0ODRbyDQ3WZlvDYCU2hA/edit#gid=1388495398"]
Both of these shortcodes have the same effect. The gid attribute in the shortcode is specifically for backwards-compatibility with “old” style Google Spreadsheets, so you only need to use it if the spreadsheet you’re trying to embed was created several years ago.
That makes it even easier. I thought about trying that after I started understanding the gid function on Google Spreadsheets a little bit better. Now I don’t even have to input the gid= shortcode. I just clone the rows (using Theme X’s Visual Composer Backend Editor) and then copy and paste the URLs (from the browser once I have clicked on the tab I want to paste) that already include the gid into the gdoc key shortcode.
You made such a complicated problem so easy. Your hard work is much appreciated. I would gladly have paid a good bit of $ for this kind of plug-in and customer service btw. You go beyond what most paid services do. It does not go unnoticed, Meitar.
Plugin Author
Meitar
(@meitar)
🙂 The point of this plugin is to provide a zero-cost alternative to other plugins that are trying to sell you something that should be free in the first place. If you have an idea for a feature you think will improve this plugin, or if you see a different for-pay plugin doing something this plugin can’t do, let me know so I can write that feature into this plugin. No one should have to pay money to use web services that are free. That’s part of what free software means.
If you like this plugin, feel free to review it positively, click the donate button to help me out personally, and tell your friends about it. 🙂