There is no out-of-the-box support for querying from an Excel spreadsheet. 
 The easiest thing to do (in terms of coding) is to convert your Excel 
sheet into a Google Docs spreadsheet and query that, which we can help you 
with if you want.  If you don't want to or can't do that, then it depends 
on whether the spreadsheet is located client-side or server-side.  If the 
file is server-side, then you need to read in the contents and output them 
in a format the charts can understand (ie, javascript array or JSON string) 
using whatever server-side processing you use (PHP, perl, Java, ASP, 
Python, etc).  If the file is client-side, then you'll have to figure out 
how to do a file read from javascript (Google it) and parse the contents 
into something the charts can understand.  I wish you luck in this 
endeavor, as MS Office files aren't exactly easy to parse.

On Tuesday, April 17, 2012 6:36:51 PM UTC-4, Molasses26 wrote:
>
> Hi!  I have an Excel Spreadsheet with the following data: 
>
> Year: 2011    2012 
> Jan    4802    5178 
> Feb   4688    5989 
> Mar   4764    5556 
> Apr   4813 
> May  4813 
> etc..... 
>
> I would like to refer to this spreadsheet to create a Google Column 
> Chart. 
>
> Can you please show me the correct code to refer to my Excel 
> Spreadsheet? 
> I have created the charts by coding the data in directly: 
> ======================================= 
>     <script type="text/javascript"> 
>       google.load("visualization", "1", {packages:["corechart"]}); 
>       google.setOnLoadCallback(drawChart); 
>       function drawChart() { 
>         var data = new google.visualization.DataTable(); 
>         data.addColumn('string', 'Month'); 
>         data.addColumn('number', '2011'); 
>         data.addColumn('number', '2012'); 
>         data.addRows([ 
>           ['Jan', 4802, 5178], 
>           ['Feb', 4688, 5989], 
>           ['Mar', 4764, 5556], 
>           ['Apr', 4813, ], 
>             . . . . . 
>  ======================= 
>  But I don't know how to make it refer to the spreadsheet instead. 
> Thanks! 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/Lv1a_h1B-McJ.
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