Apache OpenOffice Calc ยท Styles and templates ยท Intermediate
Add Safe Report Headers and Page Numbers in OpenOffice Calc
Set explicit report identity, sheet-name and page fields in Apache OpenOffice Calc headers and footers, then inspect output for unwanted file paths.
Documentation-qualified exercise; native application verification pending ยท Editorial standards
A printed sheet needs an identity even when it is separated from the workbook. Put a deliberate report label in the header, insert the sheet-name field, and use page fields in the footer. Do not assume the button called File Name inserts only a harmless filename: the versioned Help documents a title default and a path option.
Scope and a safe practice copy
This procedure follows the Apache OpenOffice 4.1 Calc Guide and 4.1.16 English desktop Help. No native application build, operating system, preview, PDF export or save/reopen was tested for this exercise. The small arithmetic check is independently calculated; the output checks below must be performed in your installation. This is not a LibreOffice, web or mobile procedure.
Start a new workbook, rename its working sheet Supplies, and enter this A1:B4 fixture:
| Cell in column A | Cell in column B |
|---|---|
| Item | Units |
| Markers | 3 |
| Folders | 5 |
| Total | =SUM(B2:B3) |
The total in B4 should be 8. These are fictional counts. Widen both columns enough to show the labels. Save an ODS baseline as report-identity-before.ods, then use Save As to create report-identity-practice.ods. Keep the baseline unchanged.
Select A1:B4 and choose Format โ Print Ranges โ Define. This small fixture makes the identity checks easy; it is not intended to guarantee multiple pages. If you already have a larger report, work on a separate copy and use the print ranges and repeated headings guide for its data-area setup.
Configure the header deliberately
Headers and footers belong to a page style, not to selected cells. Before changing an existing workbook, check whether other sheets share that style. Use separate page styles when sheets need different report labels. A shared style containing a typed label can otherwise put the same label on unintended sheets.
- With Supplies active, choose Format โ Page, select Header, and enable Header on.
- For this exercise select Same content left/right. This keeps the same header content on even and odd pages; it does not mean the three horizontal text areas contain the same text.
- Click Edit. Inspect all three areas and remove any existing content from each before adding the practice identity.
- In Left Area, type
Practice supplies โ reviewed copy. This is literal text, not a field linked to a cell or document property. Update it manually when the report’s meaning changes. - In Center Area, insert the Sheet Name field using its button. Do not type
Suppliesas a substitute: the point is to identify the sheet using a field. - Leave Right Area empty. Confirm the content dialog and page-style dialog.
The guide documents three independent content areas and custom-field buttons. The versioned Help distinguishes the sheet-name placeholder from ordinary text. No claim is made here about exactly when fields refresh after renaming a sheet; inspect the resulting preview rather than trusting an old display.
Add page fields rather than fixed numbers
Return to Format โ Page, open Footer, turn the footer on, and select Same content left/right there as well. Click Edit and clear existing content from all three areas.
In Center Area type Page , insert the Page field, type of, and insert the Pages field. Keep the left and right areas empty, then confirm both dialogs. Use the buttons for the two numbers; typing Page 1 of 1 would leave fixed text in the footer.
The 4.1.16 Help describes Page as page numbering and Pages as the total number of pages in the document. Do not interpret Pages as a count of records, or promise it will equal the number of pages in a later selected-page export. Inspect the actual output, particularly if exporting only part of a workbook or changing numbering settings.
If you need a document filename instead
The File Name button is not equivalent to typing a report label. The 4.1.16 Help says a normal click inserts the document title, falling back to the filename if no title has been assigned in File โ Properties. A long-click offers title, filename, or path/filename choices.
For this practice report, retain the literal left-area label. If a real report specifically needs a document field, first review its title and filename for suitability. In a working copy, replace the label with the deliberately selected field option, then inspect the resolved output. Do not select path/filename for a public report merely because it is available: folder names can reveal usernames, internal project names or network locations. A filename or document title can itself be sensitive.
If the field shows an unexpected title or path, return to Edit, remove that field and restore an approved literal label, or select the intended safe option explicitly. Removing visible header text is not a metadata-sanitization procedure for the whole ODS or PDF file.
Preview and inspect the actual report
Choose File โ Page Preview and verify:
- The header contains the exact approved label and the correct sheet name, not an unresolved placeholder or an unrelated sheet’s identity.
- The footer contains resolved page fields rather than accidentally typed fixed digits.
- No unwanted title, filename, directory path or extra preset text remains in any of the six header/footer areas.
- Labels are readable and do not collide or disappear at the edges; the table still shows both items and total 8.
For a genuinely multipage report inspect later pages too. If left/right content was intentionally made different, inspect both variants; checking only the first page is insufficient. The small practice fixture may have only one page. Paper, margins, scaling, fonts and printer settings affect pagination, so this guide specifies no required page count.
If a header is missing, check Header on for the sheet’s assigned page style. If text is clipped, shorten the label or review the header’s margins, spacing and height; the documented AutoFit height option can accommodate its content, but preview is still necessary. Repeated table-heading rows are a separate setting and will not repair a missing page header.
Save the working ODS, close it, reopen it, and inspect the configured areas and preview again. Confirm B4 remains 8. If you accidentally overwrote the fixture, create a fresh working copy from the baseline rather than relying on Undo after reopening. CSV is not a suitable format for preserving this page-style configuration.
When distributing a PDF, choose File โ Export as PDF, review its range/options, and export to a new filename. Open that actual PDF separately and check every output page for the intended identity, complete table content and absence of unwanted visible paths. Export success alone is not evidence of correctness. Native persistence, PDF rendering, metadata removal and physical printing remain unverified here; no screenshot is presented as execution evidence.
First-party references
Checked 21 October 2026. These sources support the documented controls, not a claim that this fixture was run.
- Header/footer ownership by page styles.
- Enabling and sizing a header or footer.
- Editing the three areas and inserting fields.
- Apache OpenOffice 4.1.16 Header/Footer Help: title, file/path choices and page fields.
- Apache OpenOffice 4.1.16 Header Help: same left/right content and AutoFit.
- Controlling PDF content and quality.