In the data source url, when it points to a Google Stpreadsheets page, you can specify the sheet and the range as a apart of the URL:The range parameter in the format of A1:B5 can limit the selected range, and the sheet can be set by a parameter sheet=<sheetName>
So the entire url will be something like: http://spreadsheets.google.com/tq/key=12345&sheet=Sheet1&range=A1:B2 VizGuy On Wed, Nov 19, 2008 at 5:45 PM, Mathieu <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a spreadsheet on "Google Documents" with a sheet1, a > sheet2, ... > > 2 things : > > - I want to select a sheet of my spreadsheet using JavaScript > functions, is it possible ? > - After that, i want to select a column of this sheet, and draw only > this one on my iGoogle page, is it possible ? > > I did that : > > > --------------------------------------------------------------------------------------------------- > function initialize() { > // The URL here is the URL of the spreadsheet. > // This is where the data is. > var query = new google.visualization.Query([EMAIL PROTECTED]); > query.send(draw); > } > > function draw(response) { > if (response.isError()) { > alert("Error in query") > } > var ticketsData = response.getDataTable(); > var table = new google.visualization.Table > (document.getElementById('table_div')), > > // HERE I WANT TO SELECT A SHEET i.e "sheet1".. > // AFTER I WANT TO SELECT AND DRAW A COLUMN OF THIS SHEET, i.e > "adress" > > table.draw(ticketsData, {allowHtml: true, showRowNumber: > true}); > > } > > --------------------------------------------------------------------------------------------------- > > Thanks by advance, > > Mat > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
