Prev Align |
ExcelExplorer Manual |
Next Borders |
 |
(ExcelExplorer 4.0)
Get background color.
false EEColor BackgroundColor( )
Parameters
- None
Description
Returns background color (EEColor object) for this style.
This method can returns FALSE if no background color assigned to the cell (system window background color used) or
file have been explored with option read_bgcolor set to FALSE.
So before using any methods of EEColor object you should always check if this function returns valid object.
Print background color for the cell, if any, in HTML format
<?php
$bgcolor = $ee->Cell($sheet,$col,$row)->Style()->BackgroundColor();
if( $bgcolor ) {
echo 'Background color: '.$bgcolor->HTML();
} else {
echo 'System window background color is used for this cell';
}
?>
|