Google Charts only supports Google Sheets spreadsheets. You would have to
import the spreadsheet into Google Drive. After you've done that, you can
just copy the url that the browser shows you, and it should work.

A URL like this will work:
https://docs.google.com/spreadsheets/d/1gjb-p4deZ7qStHYdaoeUcMDpmJvzxE-XZLZoo-roH8o/edit

But this is what the url actually winds up being translated to:
https://docs.google.com/spreadsheets/d/1gjb-p4deZ7qStHYdaoeUcMDpmJvzxE-XZLZoo-roH8o/gviz/tq
On Thu, Apr 2, 2015 at 9:11 PM <[email protected]> wrote:

> I was able to insert an excel spreadsheet using a serviceaccount.
>
>  How do I get the URL to that excel spreadsheet that I can use for Google
> Charts?
>
> <html>
> <head>
> <script type="text/javascript" src="https://www.google.com/jsapi";></script>
> <script type="text/javascript">
> google.load("visualization", '1', {packages:['corechart']});
> google.setOnLoadCallback(drawChart);
> function drawChart() {
>   var query = new google.visualization.Query('### what to put here? ###');
>   query.send(handleQueryResponse);
> }
>
> function handleQueryResponse(response) {
>   if (response.isError()) {
>     alert('Error in query: ' + response.getMessage() + ' ' +     
> response.getDetailedMessage());
>     return;
>   }
>
>   var data = response.getDataTable();
>   var chart = new 
> google.visualization.ColumnChart(document.getElementById('columnchart'));
>   chart.draw(data, { legend: { position: 'none' } });
> }
> </script>
>
> <title>Data from a Spreadsheet</title>
> </head>
>
> <body>
> <span id='columnchart'></span>
> </body>
> </html>
>
>  --
> 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.
>

-- 
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