Here you are not using the spreadsheets api that can be used to access or
modify spreadsheets, but the visualization api that can read data from data
sources, like spreadsheets (and others).
If the underlying spreadsheet contains finance formula, you will get the
actual value.
T olearn more on the spreadsheets api, look at
http://code.google.com/apis/spreadsheets/overview.html

VizGu



On Tue, Nov 18, 2008 at 2:57 AM, Pragan <[EMAIL PROTECTED]> wrote:

>
> Is it possible to use GoogleFinance functions inside of a script (php
> or js) in the visualization api to be processed in the spreadsheet
> api? For example, we have
>
> <html>
>  <head>
>
>    <script type="text/javascript" src="http://www.google.com/jsapi";></
> script>
>    <script type="text/javascript">
>
>         google.load("visualization", "1",
> {packages:["annotatedtimeline"]});
>        google.setOnLoadCallback(drawChart);
>
> function drawChart() {
>       var query = new google.visualization.Query('http://
> spreadsheets.google.com/pub?
> range=A3:F222&headers=-1&key=paMPZbgrLy26_fkHVnLkCSg&gid=1'<http://spreadsheets.google.com/pub?range=A3:F222&headers=-1&key=paMPZbgrLy26_fkHVnLkCSg&gid=1'>
> );
>
>       query.send(error);
>     }
>     function error(response) {
>       if (response.isError()) {
>         alert('Error in query: ' + response.getMessage() + ' ' +
> response.getDetailedMessage());
>         return;
>       }
>       var data = response.getDataTable();
>
>       var chart = new google.visualization.AnnotatedTimeLine
> (document.getElementById('chart_div'));
>       chart.draw(data, {width: 600, height: 240, is3D: true});
>
>    }
>
>    </script>
>  </head>
>
>  <body>
>            <div id="chart_div" style="width: 850px; height: 240px;"></div>
>
>  </body>
> </html>
>
> In the above code, is it possible to write a GoogleFinance formula (as
> a string or expression for example) in the script to be placed into
> one of the cells in the spreadsheet?
>
> regards
> >
>

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