(ExcelExplorer 4.0)
Returns whether row is empty (contains at least one cell with actual data) or not.
boolean IsEmpty( )
Parameters
- None
Description
Returns TRUE if no cells with actual data (cells with type other than EE_CELL_EMPTY and EE_CELL_BLANK) is present in the specified row.
Otherwise returns FALSE.
Note that all cells that belongs to the merged cells area are considered as non-empty.
In the example below cell E4 contains text "merged" and cell E5 not contains actual data but within merged cells area - therefore this method called for the 5th row will returns FALSE (non-empty row).
Worksheet that used in the example below:
 |
A |
B |
C |
D |
E |
F |
G |
| 1 |
|
|
|
|
|
|
|
| 2 |
|
text |
|
|
|
|
|
| 3 |
|
|
text |
|
|
|
|
| 4 |
|
|
|
text |
merged |
|
|
| 5 |
|
|
|
|
|
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
|
|
|
|
|
|
Print rows info - is it empty or not for the worksheet above
<?php
for( $i=0; $i<7; $i++ ) {
echo 'Row '.$i.' is ';
echo $ee->Worksheet(0)->Row($i)->IsEmpty() ? 'empty' : 'non-empty';
echo "\n";
}
?>
Will output: Row 0 is empty
Row 1 is non-empty
Row 2 is non-empty
Row 3 is non-empty
Row 4 is non-empty
Row 5 is empty
Row 6 is empty
|