STYLE Function (OpenOffice Calc)
Use OpenOffice Calc STYLE syntax to understand cell-style requests, optional timed changes and the zero numeric result, with source-only limits clearly explained.
Verification status: 6 source-derived formula patterns were checked against Apache OpenOffice 4.1.16 registration, argument descriptions and the complete callback. Numeric-zero behavior was source-reviewed; no styles, timers or native examples were executed. How formula examples are checked
Quick answer: STYLE requests a named style for the formula cell and normally contributes numeric zero. Optional arguments specify a delay in seconds and a later style. A zero return does not prove that the style was visibly applied.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Registered and implemented in Apache OpenOffice 4.1.16. No retirement is established.
- Scope: Desktop Calc with English semicolon-separated formulas. The described behavior is tied to the inspected version.
- Checked: October 14, 2026. Function-specific source and documentation were inspected. No style or timer was executed. No native example is claimed.
What STYLE does
STYLE combines a numeric expression with a formatting request. Its target is the cell containing the formula, rather than an arbitrary range named by an extra argument. The official guide describes an initial style and an optional second style after a delay. This guide inspects that contract and the 4.1.16 callback without running formatting or timers.
Syntax and arguments
STYLE(Style[; Time[; Style2]])
Square brackets mark optional arguments; do not type them. Style is the required name of a cell style. Time is an optional delay in seconds. Style2 is the optional later cell-style name. The callback accepts one to three arguments; omitting Time initializes the timeout to zero, and omitting Style2 leaves an empty second-style name. A named style must be meaningful in the document; creation or lookup of missing styles was not reviewed. Versioned argument description.
Source-derived examples
These examples explain the inspected code and documented contract. They were not executed. Numeric contributions are separated from unverified visual or timing effects.
| Formula or pattern | Source-derived interpretation | Important context |
|---|---|---|
=STYLE("Review") |
Numeric contribution: 0 | Requests the Review style for this formula cell. |
=10+STYLE("Review") |
Numeric reference: 10 | Adds the ordinary zero contribution to 10. |
=SUM(10;20)+STYLE("Review") |
Numeric reference: 30 | Adds zero to the independent sum. |
=STYLE("Review";5;"Normal") |
Numeric contribution: 0 | Requests a 5000 ms delay and later Normal style. |
=STYLE("Review";1.5;"Normal") |
Numeric contribution: 0 | Source converts 1.5 seconds to 1500 ms. |
=STYLE("Review";-2;"Normal") |
Numeric contribution: 0 | Source clamps the negative timeout to zero. |
Practical worksheet
Suppose a document already has a Review cell style. The expression =SUM(10;20)+STYLE("Review") combines a mathematical total of 30 with a request to style the cell that holds the formula. The zero contribution preserves that arithmetic result under the ordinary inspected path. It does not style the cells containing the inputs.
Use names that already exist in the intended document and keep the arithmetic readable. A formula can be numerically correct while the style request is ignored or behaves differently in another document context. Check the visual result separately when formatting matters.
The examples use descriptive style names. They do not establish that every installation contains Review or Normal, and they do not create those styles. For a static layout, applying a cell style directly avoids embedding a formatting request in a calculation.
Advanced interpretation and checks
The callback multiplies Time by 1000 and casts it to an integer millisecond timeout. Negative values are then replaced by zero. The examples use small, exactly representable values, so 5 seconds and 1.5 seconds become 5000 and 1500 milliseconds. Extreme values and timer-resolution behavior were not examined.
For an ordinary document with a document shell, the code broadcasts a style-change hint containing the current cell’s range, the first style, timeout and second style. It skips this broadcast for clipboard or undo documents, and cannot send it when there is no document shell. It still reaches the zero-valued result on that ordinary argument path.
That separation is important: testing whether STYLE returns zero is not a test of whether a visible style changed or a timer fired. The later style-handling code, event timing and actual rendering were not executed or comprehensively reviewed here.
An IF expression can select which STYLE call is evaluated in a worksheet design, but the conditional result and the formatting side effect should be assessed separately. Avoid using a formatting side effect as the only record that a business condition occurred. Inspected callback.
Boundaries and troubleshooting
Exactly one, two or three arguments are accepted by the inspected callback. The source’s zero result applies to the ordinary path; it is not a promise that every malformed argument, missing style or evaluation error succeeds silently.
STYLE is not a general number-formatting function and does not replace a numeric value with formatted text. The mathematical references in the table are source-derived examples, not native observations. No timer was started and no cell formatting was changed during this review.
Keep timing-sensitive presentation separate from durable data. If a workbook is copied, exported or opened in another product, do not assume that a zero numeric result proves equivalent formatting behavior.
Related functions
Official evidence and checking scope
- Complete 4.1.16 function implementation
- English native-name registration
- Function description and arguments
- Official AOO4 spreadsheet-function guide
The review covers the documented syntax and exact retained 4.1.16 implementation. Style handlers, timers and visible formatting were not tested.