Contact

LibreOffice Calc · Styles and templates · Beginner

Create Reusable Cell and Page Styles in LibreOffice Calc

Build named Calc cell styles and a separate page style, test inheritance and direct-format overrides, and keep report layout changes scoped to one sheet.

Documentation checked 2026-10-19; native workflow not run · Editorial standards

Use a cell style for repeated formatting inside the grid and a page style for a sheet’s printed layout. Naming these rules lets you change several report cells together without manually repainting each one.

Make a report whose numbers are easy to check

Use a desktop Calc ODS workbook with the standard menu bar. The documentation basis is Calc Guide 25.2 and current first-party Help labeled 26.8, checked October 19, 2026. These are documentation-backed instructions, not a claim of a native GUI test.

Create sheets Report and Notes. In Report.A1:C5 enter:

Item Units Amount
Paper 2 18.5
Labels 3 7.25
Folders 1 12
Total =SUM(B2:B4) =SUM(C2:C4)

Put Internal notes in Notes.A1. The totals are 6 units and 37.75. Save a working copy as report-styles.ods. Keep the numbers numeric: type 18.5 rather than a currency amount stored as text. Formatting must never be your method for changing the underlying calculation.

1. Define two cell styles

Open View → Styles and choose the Cell Styles category. Right-click an existing style and choose New. In the name/general tab, name the style ReportAmount and select Default as its parent in Inherit from. On Numbers, choose a number format with two decimal places. On Font, use an available font and size 11. Confirm.

Create another style named ReportTotal. Set Inherit from to ReportAmount, then make its font bold and add a top border. Leave the number format inherited rather than defining another one. The Calc styles guide describes the parent relationship: inherited properties follow the parent; explicitly defined properties belong to the child.

Select C2:C4 and double-click ReportAmount in the Styles deck. Select C5 and double-click ReportTotal. Expected displays are 18.50, 7.25, 12.00 and 37.75. B5 remains 6; the number formatting applies only where you assigned it.

Do not include A5 in the numeric style just to obtain a border. Give text labels their own treatment or select the desired border cells separately. Small, role-specific styles are easier to maintain than a single style containing every possible format.

2. Change a shared rule and expose an override

Right-click ReportAmount and choose Edit Style. Change its font size to 12. C2:C4 should follow that change. C5 should also inherit the new size if ReportTotal has not independently specified it; its bold treatment and top border remain.

Next apply a yellow background directly to C3 using the formatting toolbar. Edit ReportAmount to use a pale blue background. Compare all four amount cells:

  • C2 and C4 should show the style’s pale blue.
  • C3 can retain its direct yellow override.
  • C5 should follow the inherited background unless ReportTotal defines its own.

Select C3 alone and choose Format → Clear Direct Formatting. Its style stays assigned while the direct yellow fill is removed. The Clear Direct Formatting reference distinguishes direct attributes from applied styles. This command can also clear other intentional direct attributes on that cell, so use it on the smallest useful selection.

Checkpoint: C3 now agrees with ReportAmount and still contains 7.25; C5 still calculates 37.75. If the number changed, something other than formatting was edited.

3. Give Report its own printed page layout

Switch the Styles deck to Page Styles. Create a new style named ReportLandscape. On the page settings tab select A4 paper, Landscape orientation and 1.5 cm margins. Leave its other settings unchanged for this experiment. Confirm, activate only the Report sheet, and double-click ReportLandscape to apply it.

The Calc Page Style reference covers the page-layout, header/footer and sheet-printing settings. Check the page-style name on the status bar for each sheet: Report should use ReportLandscape; Notes should keep its prior style.

Open print preview for Report and check the landscape page. Return to the sheet and inspect Notes separately. A page style is shared by every sheet to which it is assigned: modifying a shared default can change several sheets. Creating a separate named style is what isolates this experiment.

Page styles do not use the cell-style parent chain. Do not look for a cell-style inheritance setting to make one sheet follow another’s page layout. Assign the same named page style when shared layout is intentional; assign separate named styles when it is not.

Maintenance, recovery and limits

Save and reopen the ODS. Inspect the two cell-style definitions, their parent relationship and Report’s page-style assignment. Change the amount in C2 to 20: the total should become 39.25 with its total style intact. Undo the value change to return to 37.75.

If only one amount ignores a style update, inspect direct formatting before recreating the style. If many cells ignore it, confirm their assigned style and the child style’s explicit properties. If colors change according to values, investigate conditional formatting, which is a separate rule system.

To recover from an unwanted page-layout change, reassign the original page style to Report or undo the style edit. To remove an unwanted direct override, clear direct formatting; assigning another style is not a reliable substitute for auditing overrides.

An ODS preserves named styles. CSV cannot preserve this design. For an actual report delivery, check print ranges, scaling and PDF output separately: creating a landscape style alone does not prove that a wide or tall report fits legibly on a page.