public function testUpdateCell()
 {
     $this->gdata->updateCell(5, 1, 'updated data', $this->sprKey, $this->wksId);
     
     $query = new Zend_Gdata_Spreadsheets_CellQuery();
     $query->setSpreadsheetKey($this->sprKey);
     $query->setCellId('R5C1');
     $entry = $this->gdata->getCellEntry($query);
     $this->assertTrue($entry instanceof Zend_Gdata_Spreadsheets_CellEntry);
     $this->assertTrue($entry->cell->getText() == 'updated data');
     
     $this->gdata->updateCell(5, 1, '', $this->sprKey, $this->wksId);
 }
Esempio n. 2
0
 /**
  * Updates an existing cell.
  *
  * @param int $row The row containing the cell to update
  * @param int $col The column containing the cell to update
  * @param int $inputValue The new value for the cell
  * @param string $key The key for the spreadsheet to be updated
  * @param string $wkshtId (optional) The worksheet to be updated
  * @return CellEntry The updated cell entry.
  */
 public function updateCell($row, $col, $inputValue, $key, $wkshtId = 'default')
 {
     $cell = 'R' . $row . 'C' . $col;
     $query = new Zend_Gdata_Spreadsheets_CellQuery();
     $query->setSpreadsheetKey($key);
     $query->setWorksheetId($wkshtId);
     $query->setCellId($cell);
     $entry = $this->getCellEntry($query);
     $entry->setCell(new Zend_Gdata_Spreadsheets_Extension_Cell(null, $row, $col, $inputValue));
     $response = $entry->save();
     return $response;
 }