Ejemplo n.º 1
0
 /**
  * Retrieve a particular cell
  * @param	string								$st_id	Spreadsheet ID
  * @param	string								$wt_id	Worksheet ID
  * @return	Zend_Gdata_Spreadsheets_CellEntry	$entry	CellEntry object containing cell data
  */
 public function getCell($st_id, $wt_id, $cell_id)
 {
     $query = new Zend_Gdata_Spreadsheets_CellQuery();
     $query->setSpreadsheetKey($st_id);
     $query->setWorksheetId($wt_id);
     /*
      * Parse cell id
      */
     // min length is 4
     if (strlen($cell_id) < 4) {
         throw new Exception();
     }
     $matches = array();
     preg_match("/^R(\\d+)C(\\d+)\$/", $cell_id, $matches);
     $query->setMaxRow($matches[1])->setMinRow($matches[1])->setMaxCol($matches[2])->setMinCol($matches[2]);
     return $this->getFeed($query->getQueryUrl());
 }