Zend GData worksheet

What is the $worksheetId from the Zend GData documentation that should be?

http://framework.zend.com/manual/en/zend.gdata.spreadsheets.html

 $query = new Zend_Gdata_Spreadsheets_ListQuery(); $query->setSpreadsheetKey($spreadsheetKey); $query->setWorksheetId($worksheetId); $query->setSpreadsheetQuery('name=John and age>25'); $listFeed = $spreadsheetService->getListFeed($query); 

The documentation uses this $worksheetId several times, but I don't see how to get this from the spreadsheet.

+4
source share
2 answers

If you do not know the identifiers of the worksheet, you must execute the first query to get the metafile tables for your table:

 $query = new Zend_Gdata_Spreadsheets_DocumentQuery(); $query->setSpreadsheetKey($spreadsheetKey); $feed = $spreadsheetService->getWorksheetFeed($query); 

Then you iterate over the $ feed-> entries, and each entry will represent a worksheet and have an identifier.

+2
source

$worksheetId is the identifier of the worksheet. Worksheets have the identifier gid (1,2, ....), which you can see directly in the document URL when you open it.

Unfortunately, you cannot access them through the API with this identifier.

Use instead the codes you find in the following discussion:

GID worksheets

0
source

Source: https://habr.com/ru/post/1369357/


All Articles