0

I am trying to use zend gdata to get the worksheets for a spreadsheet. I am able to get the list of worksheets using

$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$query->setSpreadsheetKey($key);
$feed = $spreadSheetService->getWorksheetFeed($query);

I was wondering how I could get worksheetId.

I appreciate any help.

Leah Collins
  • 637
  • 2
  • 9
  • 21

1 Answers1

6

You can cycle through the worksheet ids like this:

foreach ($feed->entries as $entry)
{

/*use basename since this outputs a url & the id we need is just the last bit */

$worksheetId = basename($entry->id);

/* do something e.g.*/

echo $entry->title." : ".$worksheetId."\n";

}
David Ravetti
  • 2,030
  • 1
  • 17
  • 22
ovenready
  • 76
  • 1
  • 3