The Query API has never had a problem with text-only spreadsheets, to my 
knowledge.  If you could provide a link to your spreadsheet (or create a 
new one that demonstrates the problem), I'll take a look and see what I can 
figure out.

On Thursday, March 27, 2014 10:05:18 AM UTC-4, Kevin Johnson wrote:
>
> The task
> I'm building a smaller scale website with limited content that needs to be 
> regularly updated. Most of the content is lists that currently live in 
> spreadsheets, so I had the bright idea to keep the existing Gdocs 
> spreadsheets and use gviz to import the data, which JS could then properly 
> format and drop in to the DOM. Whenever content needs to be updated then 
> anyone can edit the spreadsheet and viola, the site is automagically 
> updated.
>
> The code
>         var rq = function(){
>             var query = new google.visualization.Query(sheet);
>             query.send(handleData);
>         };
>         google.setOnLoadCallback(rq);
>         var handleData = function(response) {
>             if (response.isError()) {
>                 alert('Error in query: ' + response.getMessage() + ' ' + 
> response.getDetailedMessage());
>                 return;
>             }
>             var rows = response.getDataTable().toJSON();
>             console.log(rows);
> Pretty straight forward gviz query, but the content was not importing 
> properly. ALL of the row data was getting concatenated in to the "cols" 
> labels. I spent several hours researching to no avail.
>
> The solution
> Gviz is, of course, intended for creating charts and visualizations. It 
> expects to see numeric content for plotting. Without at least one column of 
> numbers in my spreadsheet it didn't know how to parse the spreadsheet data. 
> The solution was simple. Adding a column of rowIDs (although it could be 
> any column of numbers, dates, amounts, etc.) gave gviz the context it 
> needed to properly parse the data into cols and rows.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to