Skip to main content

13.12.7 Tables in ODT export

The ODT export back-end handles native Org mode tables (see Tables) and simple ‘table.el’ tables. Complex ‘table.el’ tables having column or row spans are not supported. Such tables are stripped from the exported document.

By default, the ODT export back-end exports a table with top and bottom frames and with ruled lines separating row and column groups (see Column Groups). All tables are typeset to occupy the same width. The ODT export back-end honors any table alignments and relative widths for columns (see Column Width and Alignment).

Note that the ODT export back-end interprets column widths as weighted ratios, the default weight being 1.

Specifying ‘:rel-width’ property on an ‘ATTR_ODT’ line controls the width of the table. For example:

#+ATTR_ODT: :rel-width 50
| Area/Month | Jan | Feb | Mar | Sum |
|---------------+-------+-------+-------+-------|
| / | < | | | < |
| <l13> | <r5> | <r5> | <r5> | <r6> |
| North America | 1 | 21 | 926 | 948 |
| Middle East | 6 | 75 | 844 | 925 |
| Asia Pacific | 9 | 27 | 790 | 826 |
|---------------+-------+-------+-------+-------|
| Sum | 16 | 123 | 2560 | 2699 |

On export, the above table takes 50% of text width area. The exporter sizes the columns in the ratio: 13:5:5:5:6. The first column is left-aligned and rest of the columns, right-aligned. Vertical rules separate the header and the last column. Horizontal rules separate the header and the last row.

For even more customization, create custom table styles and associate them with a table using the ‘ATTR_ODT’ keyword. See Customizing tables in ODT export.