Hi So spreadsheets uses a heuristic to guess how many header rows you have in your table. When all you data is strings, including html strings, then this guess is that there are no header rows and thus your header rows are ignored. The way to over come this is simple - you need to explicitly specify how many header rows there are in the requested range. For example:
http://spreadsheets.google.com/pub?key=tKOcHX3T8pHOCSz5X2TR6Kg<http://spreadsheets.google.com/pub? key=tKOcHX3T8pHOCSz5X2TR6Kg'> <http://spreadsheets.google.com/pub? key=tKOcHX3T8pHOCSz5X2TR6Kg'>* &headers=1* * * * * ChartMan On Thu, Aug 13, 2009 at 4:04 PM, briankennedy1 <[email protected]>wrote: > > Hey all, > > I'm creating a table from Google spreadsheet data. When my data is > processed into the spreadsheet, it does not recognize my column names. > I believe this is because I am using HTML in my cells. When I strip > out the HTML, the column names are recognized, become bold and are > able to be sorted. > > How do I get the table visualization to recognize my column names? > > If you head over here and pop in the below code you can see what I > mean: > http://code.google.com/apis/ajax/playground/?type=visualization#table > > function drawVisualization() { > var query = new google.visualization.Query( > 'http://spreadsheets.google.com/pub? > key=tKOcHX3T8pHOCSz5X2TR6Kg'); > > query.send(handleQueryResponse); > } > > function handleQueryResponse(response) { > if (response.isError()) { > alert('Error in query: ' + response.getMessage() + ' ' + > response.getDetailedMessage()); > return; > } > > var data = response.getDataTable(); > visualization = new google.visualization.Table > (document.getElementById('table')); > visualization.draw(data, {allowHtml: true}); > } > > Any help is appreciated! > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
