If you can put a unique text string at the bottom
of each spreadsheet I think you can search for it with a query
which would return row/col info.
Kind of an ugly hack though.  :-)
Cheers,
Bill Hayes

On Sep 21, 2:30 pm, Dave <dabo...@gmail.com> wrote:
> Thanks Bill.
>
> Unfortunately this requires that I download all the cells in the
> spreadsheet (or at least one column), which will add up fast in terms
> of time spent downloading, and overall data transfers. Probably not
> worth it.
>
> Thanks anyhow!
> Dave
>
> On Sep 20, 1:34 pm, "Bill H." <bhaye...@gmail.com> wrote:
>
> > Dave,
> > Each entry (worksheet) in the worksheets feed has a row and col
> > parameter,
> > but these are the current limits (an empty sheet begins with
> > row=100,col=20)
> > so this isn't what you want.
> > The only solution I know of to get row and col count for a sheet
> > is to get the actual row and col values of the
> > last cell in each ws feed. This code will do it:
>
> >   if isinstance(feed, gdata.spreadsheet.SpreadsheetsCellsFeed):
> >     last_cell_index = len(feed.entry) - 1
> >     last_cell = feed.entry[last_cell_index]
> >     col_count = last_cell.cell.col
> >     row_count = last_cell.cell.row
> >     print '%s cols,  %s rows' % (col_count, row_count)
>
> > BTW, the easiest way that I've found to examine the feeds
> > to see what's in them is to use a debugger like Wing IDE,
> > run code that gets a feed and then break just after getting the feed
> > so that you can examine it. Wing's Stack Data window has
> > a very nice display of the atom feed data.
>
> > I wish there was a good location in Code or Groups for How-To
> > code snippets like the above. I don't know if those types of posts
> > would be within the scope of this discussion group.
>
> > Regards,
> > Bill Hayes
>
> > On Sep 17, 9:47 am,Dave<dabo...@gmail.com> wrote:
>
> > > I'm using GetSpreadsheetFeed() to get a client's spreadsheets. For
> > > each, I'd like to get the number of rows in the first worksheet of the
> > > spreadsheet. I got as far as calling GetWorksheetsFeed using the
> > > spreadsheet's key, but am unsure how to extract the number of rows for
> > > a particular worksheet. I've tried using the built-in "help" function
> > > to study the objects returned, but am still lost. Any help?
>
> > > Also, is there a good tutorial with examples on using python to do
> > > these types of basic spreadsheet operations?
>
> > > Thanks!
> > >DaveA
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to