Read style format
Extension version
1.6.0or later;Build with
--enable-reader;
Resolves the style_id reported by nextRowWithFormula() into a complete description of the cell's formatting.
Methods
getStyleFormat(int $style_id): ?arrayint $style_id
Style index, matching an
<xf>entry inxl/styles.xml.
Return value
The fields below are grouped by topic.
Number format
num_fmt_id(int) — number format id;category(string) —number,percent,date,time,datetime,currency,text,custom,general;format_string(string) — format code.
Table indices
font_id(int),fill_id(int),border_id(int).
Alignment / protection
alignment(array) —{horizontal, vertical, wrap_text, indent, rotation};protection(array) —{locked, hidden};lockeddefaults totrue.
Font
font(array) —{name, size, color, bold, italic, strike, underline}.
Fill
fill(array) —{pattern_type, fg_color, bg_color}.
Border
border(array) —{left, right, top, bottom}, each side as{style, color}.
Returns null when style_id is out of range.
Example
Last updated