Title: select columns
Last modified: August 22, 2016

---

# select columns

 *  Resolved [tfwalsh](https://wordpress.org/support/users/tfwalsh/)
 * (@tfwalsh)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/select-columns/)
 * the short code is not selecting the columns i want.
    Here is my code:
 * [gdoc key=”0AjL06vjtuymZdFR2a0J6N0pOeWZZWmlLWExzT01vZEE” gid=”2″ use_cache=”no”
   query=”SELECT ‘Pedido ou agradecimento’, Timestamp order by Timestamp desc”]
 * my site is [http://orakaty.com/pedidos-de-oracao/](http://orakaty.com/pedidos-de-oracao/)
 * any help is greatly appreciated.
 * [https://wordpress.org/plugins/inline-google-spreadsheet-viewer/](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)

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

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/select-columns/#post-5707673)
 * Unfortunately, the `query` attribute is only available for “new” style Google
   Sheets. Your shortcode is accessing an “old” style Google Spreadsheet. Consider
   [moving your spreadsheet to the new Google Sheets](https://support.google.com/docs/answer/3544847?hl=en)
   and then trying again?
 *  Thread Starter [tfwalsh](https://wordpress.org/support/users/tfwalsh/)
 * (@tfwalsh)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/select-columns/#post-5707763)
 * Thank you for your response. I did move to NEW google sheets but am still unable
   to make the code work.
    here’s my code now, but it give an error:
 * [gdoc key=”[https://docs.google.com/spreadsheets/d/1RdXh5SrdQTidv7arsGFEUppLOm96SOZ5rb8YsoycGuY/edit&#8221](https://docs.google.com/spreadsheets/d/1RdXh5SrdQTidv7arsGFEUppLOm96SOZ5rb8YsoycGuY/edit&#8221);
   use_cache=”no” query=”SELECT Pedido ou agradecimento, Timestamp order by Timestamp
   desc”]
 *  Thread Starter [tfwalsh](https://wordpress.org/support/users/tfwalsh/)
 * (@tfwalsh)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/select-columns/#post-5707769)
 * more info:
    if i remove the query=”SELECT…..” all is good; like this: [gdoc key
   =”[https://docs.google.com/spreadsheets/d/1RdXh5SrdQTidv7arsGFEUppLOm96SOZ5rb8YsoycGuY/edit&#8221](https://docs.google.com/spreadsheets/d/1RdXh5SrdQTidv7arsGFEUppLOm96SOZ5rb8YsoycGuY/edit&#8221);
   class=”no-datatables” use_cache=”no”]
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/select-columns/#post-5707789)
 * What was the error you got?
 * Also, with Google Spreadsheets, I’ve found that it’s more reliable to simply 
   use the column letter (what Google calls the “column identifier”). For your spreadsheet,
   I think that means you can use a query like this:
 *     ```
       SELECT C, A order by A desc
       ```
   
 * Column C is the third column (`Pedido ou agradecimento`) and column A is the 
   first column (`Timestamp`). I tried a shortcode like this:
 *     ```
       [gdoc key="https://docs.google.com/spreadsheets/d/1RdXh5SrdQTidv7arsGFEUppLOm96SOZ5rb8YsoycGuY/edit" class="no-datatables" use_cache="no" query="SELECT C, A order by A desc"]
       ```
   
 * and this worked for me.
 * Also note that since your column names have spaces in them, you need to surround
   those column names with backquotes if you want to use them in a Google Query 
   Language query. See the [Query Language reference for documentation about this](https://developers.google.com/chart/interactive/docs/querylanguage#Select):
 * > In the following example, back-quotes are used to reference column ids that
   > contain spaces (`email address`) or that are reserved words (`date`):
   >     ```
   >     select `email address`, name, `date`
   >     ```
   > 

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

The topic ‘select columns’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Meitar](https://wordpress.org/support/users/meitar/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/select-columns/#post-5707789)
 * Status: resolved