Get value of an cell with PHPExcel Reader ?

Topics: User Forum
Nov 26, 2008 at 6:46 AM
Help me, thanks lot !

$objReader = PHPExcel_IOFactory::createReader('Excel5');
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load("14excel5.xls");
$objPHPExcel->setActiveSheetIndex(0);
$cell_value = $objPHPExcel->getActiveSheet()->getCell('A2')->getValue();

var_dump($cell_value);  ===> NULL
or echo $cell_value; ===> empty ?

Coordinator
Nov 26, 2008 at 8:44 AM
Edited Nov 26, 2008 at 8:44 AM
This might seem silly, but if I look at cell A2 in the first worksheet ('Invoice') of 14excel5.xls in Excel, it is an empty cell.
So I'm not sure I see a problem here.

What did you expect to see?