Hi,
thanks for the link. I found that I can do that as my sheet contents
come under "data view" and not "data table" but thats a good thing to
know about formaters.

about my other question : I was curious to know that vis api shows
only rows that has content even if I define the range. for example if
i say a1:i25 but if it has content only up to 20 then it shouws only
20 rows but this is not the case with direct call of the spreadsheet,
it shows the empty rows. I guess I am right in saying this.

thanks for the help.

pragan


On Mar 12, 4:59 am, VizBoy <[email protected]> wrote:
> Hi,
>
> We do not take the color formatting information from the spreadsheet, but
> only the values.
> You can format and add colors to your data using other means. See the
> formatters section in the api 
> reference.http://code.google.com/apis/visualization/documentation/reference.htm...
>
> As for the empty rows being excluded from the returned table, this is by
> design.
> If these rows are important to you, you can put empty rows into the
> datatable, in the client javascript code, after the query returns.
>
> Regards,
>    VizBoy.
>
> On Wed, Mar 11, 2009 at 11:41 PM, Pragan <[email protected]> wrote:
>
> > Hi Mr.Vizguy,
>
> > thanks for the reply. I guess I was wrong in saying that. Looks like
> > there was more delay than usual in showing that on the page. Now I
> > have another question.
> > How about the color formatting for the cells? I have defined some
> > rules in my spread sheet for certain columns but when I call that
> > sheet through api, it just shows the data from the sheet and not the
> > formatting with colors.
> > Also, even if define the max range like a2:i30(as my content is
> > dynamic, it will be 30 rows at one time and 10 rows at some other
> > time), viz api just shows the rows only that has content but that's
> > not the case if I just call this URL directly, it displays even the
> > empty rows.
> >http://spreadsheets.google.com/pub?key=pOwJNZtcSjzJS8r_oQIb3TQ&output...
> > .
> > I cannot do it without range as I might not want to show rows above 4.
>
> > any hep please?
>
> > Please check this example:
> > <html>
> > <head>
> > <script type="text/javascript" src="http://www.google.com/jsapi";></
> > script>
> >     <script type="text/javascript">
> >          google.load('visualization', '1', {packages: ["table"]});
> >      google.setOnLoadCallback(initialize);
> >      function initialize() {
>
> >          var url ='http://spreadsheets.google.com/pub?
> > key=pOwJNZtcSjzJS8r_oQIb3TQ&output=html&gid=6&single=true&range=a2:i30<http://spreadsheets.google.com/pub?%0Akey=pOwJNZtcSjzJS8r_oQIb3TQ&out...>
> > ';
> >            var query = new google.visualization.Query(url);
> >                  query.send(draw);
>
> >           }
> >      function draw(response) {
> >        if (response.isError()) {
> >          alert("Error in query")
> >        }
> >        var Data1 = response.getDataTable();
> >        var table1 = new google.visualization.Table
> > (document.getElementById('table1_div'));
> >        table1.draw(Data1, {});
> >      }
> >    </script>
> > <body>
> > <div id="table1_div"  ></div><br />
> > </body>
> > </html>
>
> > On Mar 11, 1:20 pm, VizBoy <[email protected]> wrote:
> > > Hi,
>
> > > The visualization api does not care if the cell content was created by a
> > > formula or directly.
> > > So your code should work.
> > > Please try the simplest scenario, i.e., without the "select J" and use a
> > > simple visualization where you can see all the data like a Table and let
> > me
> > > know if you see the result of the formula.
>
> > > - VizBoy.
>
> > > On Wed, Mar 11, 2009 at 6:23 PM, Pragan <[email protected]> wrote:
>
> > > > Hi,
>
> > > > I have a question in getting the data from a cell in spreadsheet that
> > > > is filled using a formula.
> > > > I created a spreadhsheet and I am trying to get the data using viz
> > > > api. One column in this cell is filled based on other cells using the
> > > > formula : =IF(A2="?",0,1)
> > > > I can see the values when I publish the sheet but not when I use this
> > > > query
> > > > "query.setQuery('select J');"  from viz api . Is there any way to
> > > > either get the content or write the formula in the code? Please let me
> > > > know.
>
> > > > thanks
> > > > pragan.
--~--~---------~--~----~------------~-------~--~----~
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