The function isEmptyElement is available under PHPExcel ?

Topics: User Forum
Mar 12, 2015 at 4:14 PM
Hi,

How to test is a node exists in a while condition ?

Thank you
Coordinator
Mar 12, 2015 at 4:20 PM
What kind of a node? A cell?
if ($objPHPExcel->getActiveSheet()->getCellCacheController()->isDataSet('B2')) { ... }
will return a true/fasle if the cell exists or not
Mar 12, 2015 at 4:31 PM
Hi Mark,

Not a cell.

I open an .xlsm Excel sheet and I try to extract somme values of nodes which have either a number value or a formula.

In the case of formula a special node of type "f" does exist with a node of type value.
In the case of a value just the node of type value exit.

I have to check if the node of type "f" exist before to extract the value.

Thank
Coordinator
Mar 12, 2015 at 4:48 PM
To get the datatype of a cell:
$objPHPExcel->getActiveSheet()->getCell('B2')->getDataType();
Valid datatype values are defined in /Classes/PHPExcel/Cell/DataType.php