4 messages in com.googlegroups.google-visualization-apiRe: Can all Google Gadgets be embedda...
FromSent OnAttachments
Raymond Yee23 Mar 2008 19:11 
VizGuy (Google)24 Mar 2008 01:03 
Raymond Yee24 Mar 2008 05:33 
VizGuy (Google)24 Mar 2008 05:39 
Subject:Re: Can all Google Gadgets be embeddable into a Google Spreadsheet?
From:Raymond Yee (raym@gmail.com)
Date:03/24/2008 05:33:05 AM
List:com.googlegroups.google-visualization-api

Thanks, VizGuy. I hadn't seen http://groups.google.com/group/google-visualization-api/browse_thread/thread/0735d18b182f52cf

So am I correct to think that any Google Gadget is *supposed* to be embeddable in a Google spreadsheet?

-Raymond

On Mar 24, 4:03 am, "VizGuy (Google)" <viz@google.com> wrote:

Hi Raymond There is an open issue that you can not have required prefs on a spreadsheet. It was discussed earlier on this group, and is a know issue. Thanks for the detailed report.

On Mar 24, 4:12 am, Raymond Yee <raym@gmail.com> wrote:

Is it possible to embed any Google Gadget into a Google Spreadsheet (GSheet)? I have a simple Google Gadget that I wrote to display statistics from ProgrammableWeb:
http://mashupguide.net/PW/2008/03/ggadgets/ProgrammableWeb.xml -- it works in iGoogle (but you need to get your own key
fromhttp://api.programmableweb.com/tomake it work). However, when I try to insert my ProgrammableWeb gadget into a GSheet, I get the following error message:

Sorry! Gadget cannot be displayed until all required settings are provided.

In an attempt to isolate the reason for this error message, I created two simple "hello world" gadgets:

<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Simple Dynamic Writing of Result in a Visualization Gadget"> </ModulePrefs> <UserPref name="_table_query_url" display_name="Data source URL" required="true"/> <Content type="html"><![CDATA[ <div id="content_div">Loading...</div>

<script src="http://www.google.com/jsapi" type="text/javascript"></ script> <script type="text/javascript"> google.load("visualization", "1"); function initialize() { // Called when the API is loaded var html = "Hello World"; _gel('content_div').innerHTML = html; } google.setOnLoadCallback(initialize); // Set callback to run when API is loaded </script> ]]> </Content> </Module>

and

<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Simple Dynamic Writing of Result in a Visualization Gadget (with a UserPref"> </ModulePrefs> <UserPref name="PW_API_KEY" display_name="API key for ProgrammableWeb" datatype="string" required="true"> </UserPref> <UserPref name="_table_query_url" display_name="Data source URL" required="true"/> <Content type="html"><![CDATA[ <div id="content_div">Loading...</div>

<script src="http://www.google.com/jsapi" type="text/javascript"></ script> <script type="text/javascript"> google.load("visualization", "1"); function initialize() { // Called when the API is loaded var html = "Hello World"; _gel('content_div').innerHTML = html; } google.setOnLoadCallback(initialize); // Set callback to run when API is loaded </script> ]]> </Content> </Module>

Both "hello world" gadgets work in the context of iGoogle -- and the first works embedded in GSheet, but the second gives rise to the above error message. The difference between the two gadgets is the addition of

<UserPref name="PW_API_KEY" display_name="API key for ProgrammableWeb" datatype="string" required="true"> </UserPref>

to the second gadget. I wouldn't think that simply defining an extra UserPref (that the code doesn't even use) should cause an error., hence, there is a bug in the interaction between GSheet and gadgets.

I'd appreciate any insight you all have to offer. If it's the case that you can't embed any Google Gadget in GSheet, then what makes a gadget embeddable in GSheet?

Thanks,