I am trying to get the index of the current active cell using PHPExcel. What I've tried so far is:
// Get worksheet dimensions
$sheet = $objPHPExcel->getSheet(0);
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
for ($row = 1; $row <= $highestRow; $row++){
for($col = 1; $col <= $highestColumn; $col++){
$cell = $sheet->getCellByColumnAndRow($col, $row);
$colIndex = PHPExcel_Cell::columnIndexFromString($cell->getColumn());
echo $colIndex;
}
}
It doesn't display anything on the browser. Can anyone help me with this?