suppose i have a cell in a worksheet that has a value of "last data cell" is this the correct way to get the index of this cell (i.e A5) using Zend GData ?
$query = new Zend_Gdata_Spreadsheets_CellQuery();
$query->setSpreadsheetKey($this->_spreadsheetKey);
$query->setWorksheetId($worksheet);
$cellFeed = $this->_spreadsheetService->getCellFeed($query);
foreach($cellFeed as $cellEntry) {
$row = $cellEntry->getCell()->getRow();
$col = $cellEntry->getCell()->getColumn();
$val = $cellEntry->getCell()->getText();
if ($val == 'last data cell'){ $index = array($row, $col); }
//echo "$row, $col = $val\n";
}
return $index;
i want to use the $index value later as a boundaries to define a range, like this for example:
$range = (string)$index[0]+1 + $index[1].":F20";
$contentAsCells = $worksheet->getContentsAsCells($range);
but the index value is numeric. how do i convert it to the "A1" format ? thanks
You can get the cell ID like this:
If $col is 'A' and $row is 1 this will output