ExcelCellFormat
in package
Lightweight cell format holder.
Compatibility shim that replaces the format object formerly returned by Spreadsheet_Excel_Writer::addFormat(). It stores the small subset of formatting options actually used by the statistics exporters (bold font and a number format code) and is applied to cells by ExcelWorksheetWriter.
Table of Contents
Properties
- $bold : bool
- $numberFormat : string|null
Methods
- __construct() : mixed
- getNumFormat() : string|null
- isBold() : bool
- setNumFormat() : void
- Set the Excel number format code (e.g. "0.00%").
Properties
$bold
private
bool
$bold
= false
$numberFormat
private
string|null
$numberFormat
= null
Methods
__construct()
public
__construct([array<string|int, mixed> $properties = [] ]) : mixed
Parameters
- $properties : array<string|int, mixed> = []
-
Subset of the legacy PEAR format properties. Recognises the "Bold" key (truthy = bold).
getNumFormat()
public
getNumFormat() : string|null
Return values
string|nullisBold()
public
isBold() : bool
Return values
boolsetNumFormat()
Set the Excel number format code (e.g. "0.00%").
public
setNumFormat(string $format) : void
Parameters
- $format : string