Contact

STYLE Function (LibreOffice Calc)

Lookup Intermediate LibreOffice Calc

Understand LibreOffice STYLE’s zero result, named-style requests and optional timer. Compare conditional formatting; visible effects remain untested.

Verification status: 6 source-derived formula interpretations were checked against LibreOffice 26.8 Help, 26.8.1.1 registration and the complete callback. Numeric/text contributions were checked; no style changes or timers were executed. How formula examples are checked

Quick answer: 10+STYLE("Good";60;"Neutral") has the numeric contribution 10+0=10. The documented formatting request applies Good and later Neutral, provided those styles exist; visual and timer behavior were not executed here.

Availability and version history

  • Introduced: First release not established; documented by LibreOffice 3.3.
  • Supported in: 26.8 Help and 26.8.1.1 native registration; no retirement is established.
  • Scope: Desktop Calc, English formulas. The documented ORG.OPENOFFICE.STYLE name is outside OpenFormula 1.3.
  • Checked: October 14, 2026. Function-specific documentation, source and example constraints were checked. Visual formatting and timers were not executed.

What STYLE does

STYLE combines a formatting request with the numeric return value 0. It acts on the cell containing the formula, rather than an independently specified target range. That zero makes it possible to add a style request to a numerical calculation without changing the intended numerical total.

Official Help recommends conditional formatting for almost all ordinary formatting rules. STYLE’s stated purpose is to help asynchronous add-ins indicate when a result becomes available. Choose it only when that behavior is genuinely needed, rather than adding it to every worksheet result. Function Help.

Syntax and arguments

STYLE("Style" [; Time [; "Style2"]])

Square brackets mark optional arguments; do not type them. Style is a quoted cell-style name. Help describes names as case-insensitive. Optional Time is a delay in seconds, and optional Style2 names the subsequent style. Help says the Default style is used if Style2 is missing. Omit trailing arguments when no timed change is wanted. This guide’s timed examples supply both Time and Style2 explicitly; the downstream timer handler and omitted-second-style behavior were not independently executed.

Source-derived examples

The table gives documented or code-derived interpretations, not recorded application results. Numeric and text results are separated from the untested visible style requests.

Formula Source-derived result or constraint Setup and interpretation
=STYLE("Good") 0 Requests the named style for the formula cell.
=10+STYLE("Good";60;"Neutral") 10 The requested timer is 60 seconds; no measured timing is claimed.
=A1*A2+STYLE("Good") 30 Assume A1=5 and A2=6; 5×6+0=30.
="Total"&T(STYLE("Result")) Total T converts the numeric zero contribution to empty text.
="Total"&STYLE("Result") Total0 Without T, the zero is appended to the label.
=A1*A2+STYLE(IF(A1*A2<100;"Bad";"Good")) 30 With A1=5 and A2=6, the requested name is Bad.

Practical worksheet

Create or confirm the intended cell styles in the workbook before relying on their names. For the simple A1=5, A2=6 example, a formula cell containing =A1*A2+STYLE(IF(A1*A2<100;"Bad";"Good")) has the numerical result 30 and requests Bad. With A2 changed to 25, the numerical calculation is 125 and the requested name becomes Good. Those numbers and name selections are independent arithmetic and conditional checks.

For a normal threshold display, conditional formatting is usually clearer: keep the formula =A1*A2 and define the visual rule separately. This preserves the distinction between the calculation and the appearance you want the interface to apply.

Advanced interpretation and checks

For text, the zero cannot simply be added to the label. The documented construction ="Total"&T(STYLE("Result")) yields Total because T applied to a numeric value returns empty text. Omitting T appends the character 0 instead. The intended label is therefore a useful numerical-versus-text check even before checking the visible style.

The complete callback converts seconds to an integer millisecond timeout and clamps a negative timeout to zero. It looks up and normalizes both style names, clears names that are not found, and broadcasts a style request only when there is something to apply. It can also skip a redundant request when the current style already matches. A numeric zero result consequently does not certify that a visible change or delayed callback occurred. Inspected implementation.

Boundaries and troubleshooting

Misspelled or absent style names cannot be treated as evidence of a working formatting rule merely because the formula returns zero. The inspected callback also depends on document context, including the document shell, and avoids applying the request to clipboard/undo documents. These conditions matter when comparing an interactive sheet with an automated calculation path.

No styles, timers, GUI rendering or asynchronous add-ins were invoked for these examples. The cited Help describes the intended interface behavior, while the source establishes the zero result and request construction. Timer scheduling, exact elapsed time and downstream handling remain outside the checked scope.

CURRENT, T, IF.

Official evidence and checking scope

The review covers the retained documentation and exact 26.8.1.1 source. No application run is claimed for this guide. Successful appearance changes and timer delivery remain unverified.