Skip to Content
OpenPreview

OpenDocument (ODT, ODS, ODP)

Show LibreOffice and OpenOffice files (ODT text, ODS spreadsheets, ODP presentations) in React, drawn by the same engines as Word, Excel and PowerPoint.

OpenDocument files are read by their own parsers and mapped onto the Word, Excel and PowerPoint models, so they get the same layout, grid and slide renderers, including search, thumbnails and printing.

Live: open.odt rendered by the library in this page.Open in the playground

Text documents (ODT)

Page styles, headers and footers, paragraph and text styles, lists with ODF numbering, tables, images, text boxes, links, notes, page number fields, and annotations shown as comments.

Spreadsheets (ODS)

Sheets, column widths, cell styles, merges, and typed values shown with LibreOffice's formatted text. Huge runs of repeated empty rows are trimmed.

Live: budget.ods rendered by the library in this page.Open in the playground

Presentations (ODP)

Master pages, backgrounds, text boxes, lists, images, tables, LibreOffice custom shapes (enhanced geometry formulas), lines and connectors, groups, notes and transitions.

Controller

OpenDocument files use the same renderers as their Office counterparts, so the controller reports exactly what it does for them:

FileBehaves likepageKindOutlineThumbnails
ODTWord'page'headings✓
ODSExcel'sheet'
ODPPowerPoint'slide'slide titles✓

detection.kind tells them apart from Office files ('odt', 'ods', 'odp') if your UI needs to.

Live: useDocViewer on deck.odp. Press a command and watch the state change.

Headless

The Word, Excel and PowerPoint examples work unchanged with ODT, ODS and ODP files. Here is the PowerPoint one on an ODP presentation:

Live: the example above, built only with the public hooks, running on deck.odp.

Not yet

  • Charts and images in ODS spreadsheets.
  • Tracked changes in ODT.

On this page