Convert an ODS Spreadsheet to PDF
Converting an .ods file — an OpenDocument spreadsheet — to PDF paginates a boundless calculation grid into fixed, printable pages, and the quality of the result is decided by three Calc settings: the print range, the fit-to-width scaling, and repeating header rows. Because ODS is LibreOffice Calc's native format, Calc's own export is the definitive conversion, with no import filter to distort anything first. This page walks through those settings, sheet selection, cell-comment handling, and the headless command for converting folders of files.
Paginating a spreadsheet needs an engine that can recalculate formulas, measure formatted cells, and honor print ranges — a Calc-class engine browsers do not provide to local pages. Since the format's own application is free, the reliable route is Calc's export, shown below.
Disclosure: this page contains affiliate placeholder links. If they were live, we could earn a commission at no extra cost to you.
AFFILIATE PLACEHOLDER: Recommended desktop PDF suite (placeholder link)
How to convert an ODS to PDF (step by step)
Method 1 — LibreOffice Calc with print ranges set (recommended)
- Select the cells that should appear in the PDF, then choose Format → Print Ranges → Define so stray data outside the range is excluded.
- Open Format → Page Style, go to the Sheet tab, and set the scaling mode to Fit print range(s) to width/height with width 1 so no columns spill onto extra pages.
- Choose Format → Print Ranges → Edit and set Rows to repeat (e.g.
$1) so column headings appear on every PDF page. - Choose File → Export As → Export as PDF, pick All sheets or a Selection in the Range box, and click Export.
Preview the cuts first with View → Page Break; the numbered gray pages show exactly what each PDF page will contain.
Method 2 — Headless conversion for folders and automation
soffice --headless --convert-to pdf --outdir ./out budget.ods
soffice --headless --convert-to pdf --outdir ./out *.ods
Saved print ranges, scaling, and repeating rows are all honored, which makes this ideal for scheduled exports — a nightly cron job can turn the day's .ods reports into PDFs with no interaction. Close any open LibreOffice window first, since headless mode cannot start while the desktop app holds the profile lock.
Method 3 — Excel's ODF filter (only when you must)
- Open the .ods in Excel, which imports it through its OpenDocument filter; check number formats, conditional formatting, and charts.
- Set the print area and scaling on the Page Layout tab, then File → Export → Create PDF/XPS.
The import step can alter details before export, so reserve this for workbooks that need a font or feature only present on your Windows/Office setup.
How it works
An .ods file is a ZIP archive of XML (OASIS OpenDocument, ISO/IEC 26300) whose content.xml stores each sheet as table rows of typed cells — value, formula, and applied style — while named print ranges and page-style definitions (paper size, orientation, scaling mode) live alongside in the same document model. As with every spreadsheet format, no pages exist in the file; the grid is conceptually unbounded, and pagination is computed at export time.
Calc's exporter first recalculates all formulas, then formats each value through its number format and measures the result with real font metrics. The page-style scaling mode decides the geometry: "Fit print range(s) to width/height: 1 page wide" computes one scale factor from the ratio of the print range's total column width to the printable width, then applies it uniformly so text and column proportions stay true. Each resulting tile is written as vector PDF content — glyph runs, border strokes, and fill rectangles — so the output is text-searchable and razor-sharp at any zoom, and charts export as vector graphics rather than screenshots.
Because no import filter sits in the path, this export is the format's ground truth: what Calc shows is what the PDF contains. The conversion is still semantically lossy in the way all spreadsheet-to-PDF conversion is — formulas, data validation, and interactivity vanish, leaving only the formatted appearance — and pop-up cell comments are omitted unless you explicitly export them as PDF annotations.
Worked example: a club treasurer's annual accounts
Test file: club-accounts-2025.ods, 164 KB — four sheets: Income (310 rows × 9 columns), Expenses (492 rows × 9 columns), a Summary sheet with a bar chart, and a Scratch sheet of pasted bank exports never meant for printing. A naive export of All sheets produced 31 pages including six pages of scratch data. After defining print ranges on the three real sheets (e.g. A1:I493 on Expenses), setting 1-page-wide scaling (which landed at 78%), and repeating row $1, a Selection export of the three sheets gave club-accounts-2025.pdf: 14 pages, 118 KB — Income on five pages, Expenses on eight, and the Summary with its chart as crisp vector art on one. The Scratch sheet, with no print range defined, contributed nothing. The identical prepared file converted by soffice --headless --convert-to pdf in a nightly script produced the same 14 pages, byte-for-byte stable across runs.
Frequently asked questions
How do I set which cells of an ODS end up in the PDF?
Select the cells and choose Format, Print Ranges, Define in LibreOffice Calc; only defined ranges are paginated into the PDF, and everything else on the sheet is ignored. Without a defined range, Calc exports each sheet's entire used area, including forgotten scratch columns.
How do I export only some sheets of an ODS workbook?
Ctrl-click the tabs of the sheets you want, then in File, Export As, Export as PDF choose Selection in the Range section; only the selected sheets are exported, in tab order. Choosing All exports every sheet that has printable content.
Why does my ODS export to twice as many pages as expected?
Columns that do not fit the page width overflow onto extra pages by default. Open Format, Page Style, Sheet tab and set Fit print range(s) to width/height to 1 page wide, or reduce content with a tighter print range; Calc then scales the grid down to fit.
Is exporting ODS from Calc better than opening it in Excel first?
Yes, ODS is Calc's native format, so exporting from Calc involves no format translation, while Excel imports the file through its ODF filter, which can change fonts, conditional formatting and chart details before the PDF is made. Go through Excel only when a Windows-specific font must be used.
Do cell comments in an ODS show up in the exported PDF?
Not by default; comments are pop-up annotations, not cell content. In the Export as PDF dialog's General tab you can tick Comments as PDF annotations to carry them over as clickable notes, or leave it off for a clean sheet.
Can I convert ODS files to PDF from the command line?
Yes, soffice --headless --convert-to pdf --outdir ./out budget.ods converts without opening a window, and *.ods handles a whole folder. Saved print ranges, scaling and repeating headers are honored, so prepare them once in the file and every scheduled export comes out right.