Missing Data in Table Query (tq) from Google Spreadsheet

2,714 views
Skip to first unread message

Mario Colombo

unread,
Oct 28, 2013, 7:01:43 AM10/28/13
to google-visua...@googlegroups.com
Hi,

I am doing a table query on a Google Spreadsheet like this:


Now, some of the cells that contain text are not returned in this table query. Instead of the text content of the cell there is just an empty value returned. The part of the object that should contain the cell value shows the following: ,,{"v":null}

If I switch the headers parameter to 1 then the first row (now header) which normally is returned missing two cells now contains all the text values, however other text cells further down in the rows are still missing their values.

Since I often need to combine text labels with data cells this is something I really need to work. Does somebody have insights into this strange behaviours?

All the best

Mario


Mario Colombo

unread,
Oct 28, 2013, 7:19:00 AM10/28/13
to google-visua...@googlegroups.com
I have prepared a test spreadsheet, please see the unexpected behaviour here:




It seems that for columns that contain text and number formatted content, the text content is stripped.

Why is that?

All the best

Mario

asgallant

unread,
Oct 28, 2013, 9:25:30 AM10/28/13
to google-visua...@googlegroups.com
I opened the spreadsheet and ran the query, and the results came back as expected, no missing values.

Mario Colombo

unread,
Oct 28, 2013, 9:32:39 AM10/28/13
to google-visua...@googlegroups.com
Hi,

The test sheet cells were still formatted as text. I switched the cells that contain numbers back to a number format (currency) and you can see that cells that contain text now do not show up anymore.

All the best

Mario

asgallant

unread,
Oct 28, 2013, 9:53:44 AM10/28/13
to google-visua...@googlegroups.com
The spreadsheet is probably doing some type detection on each column, and in the numeric columns, it is only returning data when there is a numeric value.  As far as I am aware, there is no way to override that behavior and force it to return a cell in the format {"v":null,"f":"text value"}.

jmarcus

unread,
Nov 21, 2013, 11:24:55 AM11/21/13
to google-visua...@googlegroups.com
Hi Mario and asgallant,

I'm running into the same exact problem with one of my spreadsheets and before trying to reinvent the wheel, figured I would check in to see if you either of you had come up with a solution since your last post(s). 

Thanks!
Jessica

asgallant

unread,
Nov 21, 2013, 11:32:07 AM11/21/13
to google-visua...@googlegroups.com
I have not found a work-around for this.  There probably isn't anything you can do on the javascript end of things to fix it.  On the spreadsheet end, if you can force the column to use text-values instead of numbers, that would probably solve the problem.

jmarcus

unread,
Nov 21, 2013, 12:23:07 PM11/21/13
to google-visua...@googlegroups.com
Thanks! I'll give that a try. 

Mario Colombo

unread,
Apr 29, 2014, 5:34:54 AM4/29/14
to google-visua...@googlegroups.com
Hi, yes, this is also what I am doing now.

I am also organising my table queries so they don't contain multiple types or even <empty> per column.

All the best

Mario
Reply all
Reply to author
Forward
0 new messages