In a cell-based feed, each entry represents a single cell.
Note that we don't recommend interacting with both a cell-based feed and a list-based feed for the same worksheet at the same time.
To retrieve a worksheet's cell feed, use the
getCellFeed() method of the Spreadsheets service.
<?php
$query = new Zend_Gdata_Spreadsheets_CellQuery();
$query->setSpreadsheetKey($spreadsheetKey);
$query->setWorksheetId($worksheetId);
$cellFeed = $spreadsheetService->getCellFeed($query);
The resulting Zend_Gdata_Spreadsheets_CellFeed
object $cellFeed represents a response from the
server. Among other things, this feed contains an array of
Zend_Gdata_Spreadsheets_CellEntry objects
($cellFeed>entries), each of which represents
a single cell in a worksheet. You can display this information:
<?php
foreach($cellFeed as $cellEntry) {
$row = $cellEntry->cell->getRow();
$col = $cellEntry->cell->getColumn();
$val = $cellEntry->cell->getText();
echo "$row, $col = $val\n";
}
Suppose you wanted to retrieve the cells in the first column of a worksheet. You can request a cell feed containing only this column as follows:
<?php
$query = new Zend_Gdata_Spreadsheets_CellQuery();
$query->setMinCol(1);
$query->setMaxCol(1);
$query->setMinRow(2);
$feed = $spreadsheetService->getCellsFeed($query);
This requests all the data in column 1, starting with row 2.
To modify the contents of a cell, call
updateCell() with the row, column,
and new value of the cell.
<?php
$updatedCell = $spreadsheetService->updateCell($row,
$col,
$inputValue,
$spreadsheetKey,
$worksheetId);
The new data is placed in the specified cell in the worksheet.
If the specified cell contains data already, it will be
overwritten. Note: Use updateCell() to change
the data in a cell, even if the cell is empty.




