Prev UTF8 |
ExcelExplorer Manual |
Next RichText |
 |
(ExcelExplorer 4.0)
Returns whether string contains any rich text parts or not.
boolean IsRichText( )
Parameters
- None
Description
Returns TRUE if string contains rich text parts, FALSE otherwise.
Note that if you plan to display or do some other processing on the rich text data
you can compare returned value of RichText() method with FALSE (see examples below).
But if you only need to get information about rich text data presence this method is faster alternative.
Print info about rich text data presence or do some processing
<?php
// Just print information - do not need rich text data itself
echo 'Rich text data is ';
echo $ee->Cell(0,1,1)->Data()->IsRichText() ? 'present' : 'absent';
?>
<?php
$rich = $ee->Cell(0,1,1)->Data()->RichText();
if( !$rich ) {
// no rich text data found
} else {
// do something with data
}
?>
|