There is a parameter you can use with Google Spreadsheets.
If your datasource url is http://spreadsheets.google.com?...&key=123ABC then
you can append: &headers=0 for no header rows, or &headers=1 for 1 header
row, etc... if the headers parameter is not specified, the automatic
heuristic algorithm, with the number vs. string decision-making, is used.

Hope this helps.

- VizBoy.

On Thu, Feb 26, 2009 at 11:15 PM, [email protected] <[email protected]>wrote:

>
> I figured it out... the API requires one of the columns to contain
> number to recognize the table headers.  This strikes me as a bug...
> shouldn't it just automatically recognize the first row of the
> spreadsheet as the header row?
>
> On Feb 26, 3:06 pm, "[email protected]" <[email protected]> wrote:
> > I'm having trouble figuring out why my table headers are not
> > displaying... everything is displaying in <tbody>, and the th fields
> > are empty.  Here is my code:
> >
> > <script type="text/javascript" src="http://www.google.com/jsapi";></
> > script>
> >     <script type="text/javascript">
> >       google.load('visualization', '1', {packages: ['table']});
> >     </script>
> >     <script type="text/javascript">
> >     var visualization;
> >
> >     function drawVisualization() {
> >       var query = new google.visualization.Query(
> >           'http://spreadsheets.google.com/ccc?
> > key=pPNYBDMBAFYQ9Noac_i_nQA');
> >
> >       // Send the query with a callback function.
> >       query.send(handleQueryResponse);
> >     }
> >
> >     function handleQueryResponse(response) {
> >       if (response.isError()) {
> >         alert('Error in query: ' + response.getMessage() + ' ' +
> > response.getDetailedMessage());
> >         return;
> >       }
> >
> >       var data = response.getDataTable();
> >      var table = new google.visualization.Table(document.getElementById
> > ('visualization'));
> >      table.draw(data);
> >     }
> >
> >     google.setOnLoadCallback(drawVisualization);
> >     </script>
> > <div id="visualization" style="height: 200px; width: 450px"></div>
> >
> > Can someone shed some light on this problem?  I'd appreciate any
> > feedback.
> >
> > thank you
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to