API reference: sheets and settings

Row and column inserts and deletes, sheet operations, names, visibility, panes, protection, printing and document properties.

Rows and columns

Inserting and deleting rows and columns moves every reference to them as LibreOffice moves it: formulas on every sheet, defined names, merges, conditional formats, validations, database ranges, print ranges, charts and anchored shapes.

OpenDocumentSpreadsheets.insertRows — Function
insertRows(sheet, at; count = 1)
insertRows(ods, "Sheet1.5"; count = 1)

Insert count empty rows before row at (an integer, or a string such as "5"). The rows from at down move down, and everything that refers to them follows, as in LibreOffice: formulas on every sheet, defined names, merged cells, conditional formats, validations, database ranges, print ranges, charts and anchored shapes. A range that the new rows fall inside, or whose last row is at at, grows.

The new rows take the cell formats of the row above, and its height when that height was set, and are not hidden. Inserting at row 1 gives unformatted rows. An insert that would push a cell with content or formatting off the sheet is an error, as it is in LibreOffice.

insertRows(sh, 2)                        # a new, empty row 2: =SUM(A1:B2,1) in C1 becomes =SUM(A1:B3,1)
insertRows(ods, "Sheet1.5"; count = 3)   # three rows before row 5
source
OpenDocumentSpreadsheets.insertColumns — Function
insertColumns(sheet, at; count = 1)
insertColumns(ods, "Sheet1.C"; count = 1)

Insert count empty columns before column at (an integer, or a column such as "C"). As insertRows, along the other axis. The new columns take the cell formats and default cell style of the column to their left, and the width of the column they push to the right.

source
OpenDocumentSpreadsheets.deleteRows — Function
deleteRows(sheet, rows)
deleteRows(ods, "Sheet1.3:5")

Delete rows: an integer, a range, a vector of row numbers, or a string ("3", "3:5", "3:5,9" or "3:5~9"; a cell or range gives its rows, a defined name its range's rows). The rows below move up, and everything that refers to them follows, as in LibreOffice: a reference to a deleted cell becomes #REF!, and a range that loses some of its rows shrinks. Merges whose first row is deleted are undone; validations, conditional formats and annotations on deleted cells go with them.

As in LibreOffice, a picture or shape lying wholly in the deleted cells goes with them, and one reaching beyond them stays where it is, anchored in the cell now at its place. Not yet as LibreOffice does it: a validation that no cell uses any more stays in the file, unused (LibreOffice drops it).

source
OpenDocumentSpreadsheets.deleteColumns — Function
deleteColumns(sheet, cols)
deleteColumns(ods, "Sheet1.B:C")

Delete columns: an integer, a range, a vector of column numbers, or a string ("B", "B:C", "B:C,F"; a cell or range gives its columns, a defined name its range's columns). As deleteRows, along the other axis.

source

Sheet operations

Renaming, deleting, copying and moving sheets, with references following as they follow in LibreOffice.

OpenDocumentSpreadsheets.renamesheet! — Function
renamesheet!(sheet, name)

Rename a sheet. Every reference to it follows, as in LibreOffice: formulas on every sheet, defined names and their base cells, print ranges, conditional formats, validations, database ranges and charts. Internal hyperlinks (#Sheet1.A1) are not changed, as LibreOffice doesn't change them. Renaming a sheet to its own name in another case is allowed; a name another sheet has (in any case), or one LibreOffice doesn't allow, is an error.

source
OpenDocumentSpreadsheets.deletesheet! — Function
deletesheet!(sheet) -> ODSFile
deletesheet!(ods, name) -> ODSFile
deletesheet!(ods, i::Integer) -> ODSFile

Delete a sheet (by itself, its name or its position). As in LibreOffice: references to it in the other sheets' formulas, and in defined names, become #REF!; a 3-D reference that ends on it ends on the sheet next to it, inside the span; its local names, and the database ranges, conditional formats and validations on it go with it. The only sheet can't be deleted.

source
OpenDocumentSpreadsheets.copysheet! — Function
copysheet!(sheet, name = "") -> Worksheet

Copy a sheet to the end of the file, named name, or "<name> (copy)" (with a number added until it is free). As in LibreOffice:

  • the copy's references to the source sheet written with a relative sheet name ([Data.A5]) keep their distance in the sheet order, so they refer to the copy; references with an absolute sheet name ([$Data.A5]), and those without one, are kept
  • the source's local names are copied and point at the copy, and the global names its formulas use that refer to the source become local names of the copy, pointing at it
  • conditional formats, print ranges, shapes, charts and the database ranges on the source are copied too

Returns the new sheet.

source
OpenDocumentSpreadsheets.movesheet! — Function
movesheet!(sheet; before = nothing, after = nothing) -> ODSFile
movesheet!(ods, sheet; before = nothing, after = nothing) -> ODSFile

Move a sheet next to another: immediately before or after it (give exactly one). Each of sheet, before and after can be a Worksheet, a sheet name or a position (as before the move): before = 1 moves it to the start, after = sheetcount(ods) to the end.

Nothing is rewritten, as in LibreOffice: references name their sheets. A 3-D reference (Sheet1.A1:Sheet3.A1) covers the sheets between its two ends in the order they are in, so moving a sheet into or out of that span changes what it covers.

source

Defined names

Named ranges and named expressions, the file's own and each sheet's. They follow LibreOffice's rules for names and are stored as LibreOffice stores them.

OpenDocumentSpreadsheets.addDefinedName — Function
addDefinedName(ods::ODSFile, name, value; absolute=true)
addDefinedName(sheet::Worksheet, name, value; absolute=true)

Add a defined name to the file, or to a sheet (a name only that sheet's formulas see). value can be:

  • a reference: a SheetCellRef, SheetCellRange, SheetColumnRange, SheetRowRange or NonContiguousRange, or a string such as "Sheet1.A1:B2", "Sheet1!A1:B2" or "Sheet1.A1:A3,Sheet1.C1". A sheet's name may leave the sheet out ("A1:B2", "A1,C3", "A:C"); a file's name may not.
  • a number, a Bool or any other string: a constant
  • a string starting with =: a formula, in LibreOffice's notation ("=SUM($Sheet1.$A$1:$A$9)*2"). As in LibreOffice, its references are relative to A1 of the file's first sheet (or of the sheet, for a sheet's name) unless they have $, the sheet's name included: Sheet1.A1 used on the next sheet refers to that sheet's A1.

absolute=false makes a reference relative (A1 rather than $A$1): as in LibreOffice, a formula using the name then refers to the cells at the same offset from its own cell as the reference is from A1. Its sheet stays the one named. Give a vector, one entry per area, for a NonContiguousRange.

Names follow LibreOffice's rules: a letter or _ first, then letters, digits, _ and ?, and nothing that reads as a cell reference (A1, R1C1, R, C1x). They are unique without regard to case within a file, or within a sheet; a sheet's name may be the same as a file's name, and then hides it on that sheet.

Examples

addDefinedName(ods, "Prices", "Data.B2:B20")
addDefinedName(ods["Data"], "Rate", 0.2)
addDefinedName(ods, "Total", "=SUM(Data.B2:B20)")

See also getDefinedNames, deleteDefinedName.

source
OpenDocumentSpreadsheets.deleteDefinedName — Function
deleteDefinedName(ods::ODSFile, name; force=false)
deleteDefinedName(sheet::Worksheet, name; force=false)
deleteDefinedName(xf_or_sheet, names; force=false)

Delete defined names from the file, or from a sheet: one name, or a vector of names or of the DefinedNames getDefinedNames returns (each must belong to the first argument). Names match without regard to case. Every name is checked before any is deleted: a name that isn't there, or is given twice, is an error and nothing is deleted.

Formulas that use a deleted name are left as they are: LibreOffice shows #NAME? for them. force is accepted and changes nothing: ODF files have no names the application keeps for itself.

See also deleteAllDefinedNames, addDefinedName.

source
OpenDocumentSpreadsheets.getDefinedNames — Function
getDefinedNames(ods::ODSFile; include_system=false) -> Vector{DefinedName}
getDefinedNames(sheet::Worksheet; include_system=false) -> Vector{DefinedName}

The file's own defined names, or a sheet's, sorted by name (without regard to case). A sheet's are only those that belong to it, not the file's names its formulas can use too. The result can be given to deleteDefinedName with the same first argument.

include_system is accepted and changes nothing: ODF keeps print ranges and filters in their own elements, not in names.

See also getAllDefinedNames, DefinedName.

source
OpenDocumentSpreadsheets.getAllDefinedNames — Function
getAllDefinedNames(ods::ODSFile; include_system=false) -> Vector{DefinedName}

Every defined name of the file, the file's own and every sheet's, sorted by scope (the file's first, then by sheet name) and then by name.

source
OpenDocumentSpreadsheets.DefinedName — Type
DefinedName

A defined name, as getDefinedNames and getAllDefinedNames return it. Fields:

  • name::String
  • scope::Union{Nothing,String}: nothing for a name of the whole file, or the name of the sheet it belongs to
  • value: a SheetCellRef, SheetCellRange, SheetColumnRange, SheetRowRange or NonContiguousRange for a name that refers to cells; a number, string or Bool for a constant; or the formula, as a string starting with = (in LibreOffice's notation)
  • absolute::Union{Bool,Vector{Bool}}: whether the reference is absolute ($A$1, not A1); one entry per area for a NonContiguousRange; false for anything else
  • hidden::Bool: always false: ODF has no hidden names

addDefinedName(x, dn.name, dn.value; absolute = dn.absolute) makes the name again. It is a snapshot: later edits to the file don't change it.

source

Hiding and tab colours

Hidden rows and columns, hidden sheets and tab colours, stored as LibreOffice stores them.

OpenDocumentSpreadsheets.setRowHidden — Function
setRowHidden(sheet, rows; hidden=true)
setRowHidden(ods, "Sheet1.3:5"; hidden=true)

Hide the rows rows, or show them again with hidden=false. rows is a row number, a range or vector of them, or a string naming rows ("3", "3:5"), cells ("A3:D5": their rows), a defined name, or several of these separated by commas ("3:4,8"). The rows needn't hold anything. As LibreOffice, hidden rows keep their height (table:visibility="collapse").

See also isRowHidden, setColumnHidden.

source
OpenDocumentSpreadsheets.setColumnHidden — Function
setColumnHidden(sheet, cols; hidden=true)
setColumnHidden(ods, "Sheet1.B:D"; hidden=true)

Hide the columns cols, or show them again with hidden=false. cols is a column number, a range or vector of them, or a string naming columns ("B", "B:D"), cells ("B2:D5": their columns), a defined name, or several of these separated by commas ("B:C,F").

See also isColumnHidden, setRowHidden.

source
OpenDocumentSpreadsheets.isRowHidden — Function
isRowHidden(sheet, row) -> Bool
isRowHidden(ods, "Sheet1.5") -> Bool

Whether row row (a number, or a string naming a row or a cell in it) is hidden: by hand, or by a filter (table:visibility="filter"). Works on read-only files.

source
OpenDocumentSpreadsheets.isColumnHidden — Function
isColumnHidden(sheet, col) -> Bool
isColumnHidden(ods, "Sheet1.C") -> Bool

Whether column col (a number, or a string naming a column or a cell in it) is hidden. Works on read-only files.

source
OpenDocumentSpreadsheets.setSheetVisibility — Function
setSheetVisibility(sheet, visibility::Symbol)

Show (:visible) or hide (:hidden) a sheet's tab, as LibreOffice's Sheet ▸ Show Sheet and Hide Sheet do. :veryHidden is also accepted, and hides the sheet as :hidden does: OpenDocument has only one kind of hidden sheet. The file must keep a visible sheet, so hiding the last one is an error (LibreOffice ignores it). When the sheet LibreOffice opens on is hidden, it opens on the visible sheet before it (or the first visible one), as LibreOffice does when that sheet is hidden.

See also getSheetVisibility.

source
OpenDocumentSpreadsheets.setTabColor — Function
setTabColor(sheet, color)

Colour a sheet's tab: a hex colour ("FF0000", "#FF0000", "FFFF0000": the alpha is ignored, as LibreOffice ignores it), a Colors.jl colour name or a Colorant. Theme colours are not accepted, as elsewhere in OpenDocumentSpreadsheets.

See also getTabColor, deleteTabColor.

source

Groups of rows and columns, as LibreOffice nests them:

OpenDocumentSpreadsheets.groupRows — Function
groupRows(sheet, rows; collapsed=false)
groupRows(ods, "Sheet1.3:5"; collapsed=false)

Group the rows rows (given as for setRowHidden; each run of adjacent rows is a group), as LibreOffice's Data → Group and Outline → Group does:

  • the group goes inside the deepest group that holds it, and around the groups it holds, which go one level deeper; grouping a group's rows again makes a group within it
  • groups next to each other stay separate groups, as in LibreOffice
  • a range that crosses a group (overlaps it without holding it), or that would nest groups more than 7 deep, is an error: LibreOffice refuses both

With collapsed=true the group is collapsed: its rows are hidden.

See also ungroupRows, getRowOutlineLevel, groupColumns.

source
OpenDocumentSpreadsheets.ungroupRows — Function
ungroupRows(sheet, rows)
ungroupRows(ods, "Sheet1.3:5")

Remove a level of grouping from the rows rows, as LibreOffice does: the groups at the deepest level the rows meet are removed whole (even where they reach beyond rows), and the groups inside them move up a level. Rows in no group are left alone. Rows a collapsed group hid stay hidden: show them with setRowHidden(sheet, rows; hidden=false).

source

Panes and the sheet view

How a sheet looks when LibreOffice opens it, kept in its view settings (settings.xml):

OpenDocumentSpreadsheets.freezePanes — Function
freezePanes(sheet; nrows=1, ncols=0)
freezePanes(sheet, anchor_cell)

Freeze the first nrows rows and ncols columns, so that they stay in view while the rest scrolls; or everything above and to the left of anchor_cell ("B3" freezes row 1:2 and column A), as LibreOffice's View ▸ Freeze Cells does. The view goes back to the top left, and the cursor to the first cell that scrolls. Calling it again replaces the panes.

The panes are saved with the sheet's view settings, which LibreOffice keeps where they are when rows or columns are inserted or deleted.

freezePanes(sh)            # the first row stays in view
freezePanes(sh, "B2")      # row 1 and column A

See also splitPanes, deletePanes, setSheetView.

source
OpenDocumentSpreadsheets.splitPanes — Function
splitPanes(sheet; nrows=1, ncols=0)
splitPanes(sheet, anchor_cell)

Split the view into panes that scroll on their own, after nrows rows and ncols columns (or above and to the left of anchor_cell). LibreOffice stores a split in pixels: OpenDocumentSpreadsheets places it at the edge of those rows and columns, from their heights and widths, at 100% zoom.

source
OpenDocumentSpreadsheets.setSheetView — Function
setSheetView(sheet; zoom, view, showGridLines, showRowColHeaders, showZeros, rightToLeft,
             topLeftCell, activeCell, selection)

Set how a sheet looks when LibreOffice opens it. Only the keywords given change. As LibreOffice keeps them:

  • zoom: the sheet's zoom, in percent (20 to 600, LibreOffice's range), for the view it is in
  • view: :normal or :pageBreakPreview, for the whole file (LibreOffice's page-break view is the window's). LibreOffice Calc has no page layout view: :pageLayout is an error.
  • showGridLines: the sheet's gridlines
  • showRowColHeaders, showZeros: for the whole file, as LibreOffice keeps them
  • rightToLeft: the sheet runs right to left (its table style's writing mode)
  • topLeftCell: the cell scrolled to the top left (of the part that scrolls, with frozen panes)
  • activeCell, selection: the cursor. LibreOffice keeps no selection in a file, only the cursor: activeCell, or else the first cell of selection (which must hold activeCell).

See also getSheetView, freezePanes.

source
OpenDocumentSpreadsheets.getSheetView — Function
getSheetView(sheet) -> NamedTuple

How a sheet looks when LibreOffice opens it: zoom, view, showGridLines, showRowColHeaders, showZeros, rightToLeft, topLeftCell, activeCell and selection, as setSheetView describes them. selection is the active cell (LibreOffice keeps no selection). A setting the file doesn't hold has LibreOffice's default. Works on read-only files.

source

Protection

Sheets, the file's structure and cells, protected as LibreOffice protects them:

OpenDocumentSpreadsheets.protectSheet — Function
protectSheet(sheet; password=nothing, allow...)

Protect a sheet, as LibreOffice's Tools → Protect Sheet does, so that its locked cells can't be changed in LibreOffice. Every cell is locked unless its format says otherwise (setCellProtection).

password, if given, must be typed to unprotect the sheet. It is stored as LibreOffice stores it: SHA-1 of the password (any text), in Base64. An empty password is no password, as in LibreOffice. Protection guards against mistakes, not against anyone determined to change the sheet.

The other keywords are permissions, each a Bool. LibreOffice has these: selectLockedCells and selectUnlockedCells (default true), insertColumns, insertRows, deleteColumns, deleteRows, autoFilter and pivotTables (default false). It has no counterpart for formatCells, formatColumns, formatRows, insertHyperlinks, sort, objects and scenarios: they can only be false (an error otherwise).

Protecting a protected sheet replaces its settings. OpenDocumentSpreadsheets reads and edits protected sheets as any other.

See also unprotectSheet, isSheetProtected, getSheetProtection.

source
OpenDocumentSpreadsheets.protectWorkbook — Function
protectWorkbook(ods; password=nothing, structure=true, windows=false)

Protect the file's structure, as LibreOffice's Tools → Protect Spreadsheet Structure does: its sheets can't then be added, deleted, moved, renamed, hidden or shown in LibreOffice. password is stored as protectSheet stores it. LibreOffice has no window protection: windows=true is an error, and structure must be true.

See also unprotectWorkbook, isWorkbookProtected, getWorkbookProtection.

source
OpenDocumentSpreadsheets.setCellProtection — Function
setCellProtection(sheet, ref; locked=nothing, hidden=nothing, hideAll=nothing, hidePrint=nothing) -> String or -1
setCellProtection(sheet, row, col; …) / setCellProtection(ods, "Sheet1.B2:D10"; …)

Set whether cells are locked, and whether their formulas are hidden, on a protected sheet, as the Cell Protection tab of LibreOffice's Format Cells does (style:cell-protect). Every cell is locked unless its format says otherwise. Only the keywords given change, and the cells' other formatting is kept. Address forms as setFont; as with the other format setters, whole columns and rows are formatted as such, not only up to the used range.

Two more options: hideAll (LibreOffice's Hide all: on a protected sheet the cell shows nothing, and is locked; while it is set, locked and hidden change nothing) and hidePrint (Hide when printing, style:print-content).

source
OpenDocumentSpreadsheets.getCellProtection — Function
getCellProtection(sheet, ref) -> NamedTuple
getCellProtection(sheet, row, col) / getCellProtection(ods, "Sheet1.B2")

(locked, hidden, hideAll, hidePrint) for one cell: locked and not hidden unless its format says otherwise. LibreOffice's Hide all (hideAll) also reads as locked and hidden; hidePrint is LibreOffice's Hide when printing. Works on read-only files.

source

Printing

Page setup, margins, print options, print areas and titles, headers and footers, kept in each sheet's page style as LibreOffice keeps them:

OpenDocumentSpreadsheets.setPageSetup — Function
setPageSetup(sheet; orientation, paperSize, scale, fitToWidth, fitToHeight)

Set how a sheet is printed, as LibreOffice keeps it in the sheet's page style. Only the keywords given change.

  • orientation: :portrait or :landscape (the page's width and height swap)
  • paperSize: one of :letter, :tabloid, :ledger, :legal, :executive, :A3, :A4, :A5, :B4, :B5, or a paper's number (70 is A6); the page gets that paper's size
  • scale: a percentage, 10 to 400
  • fitToWidth, fitToHeight: the pages to fit the sheet on, across and down (0: as many as needed). scale and fitting are alternatives: giving one turns the other off.

Also:

  • paperWidth, paperHeight: any paper size, in units (:cm, the default, :mm, :in or :pt), instead of paperSize. Without orientation, the page is landscape when it is wider than high, as LibreOffice's page dialog makes it; with it, the two are swapped to suit.
  • scaleToPages: fit the sheet on this many pages in all (style:scale-to-pages), a third alternative to scale and fitting.

A sheet gets a page style of its own on its first change (PageStyle_<sheet>), made from the one it had.

source
OpenDocumentSpreadsheets.getPageSetup — Function
getPageSetup(sheet; unit=:cm) -> NamedTuple

(orientation, paperSize, scale, fitToWidth, fitToHeight, paperWidth, paperHeight, scaleToPages), each nothing where the page style doesn't say. paperSize is the paper's number (9 for A4, 1 for letter, …) when the page's size is one of setPageSetup's papers; scale is given only when it isn't 100% and the sheet isn't fitted to pages; paperWidth and paperHeight are the page's size as it is printed (turned when landscape), in units; scaleToPages is the number of pages to fit the sheet on in all. Works on read-only files.

source
OpenDocumentSpreadsheets.setPageMargins — Function
setPageMargins(sheet; left, right, top, bottom, header, footer)

Set the printed margins, in inches, each measured from the edge of the page: top and bottom to the sheet's cells, header and footer to the header and footer. Only the keywords given change.

LibreOffice's page style measures the top from the edge to the header, which has a height of its own, so the margins are converted: with a header shown, the page style's top margin is header, and the header's height the rest of top (less 1/6 inch of spacing). The bottom is converted in the same way.

source
OpenDocumentSpreadsheets.setPrintOptions — Function
setPrintOptions(sheet; gridLines, headings, horizontalCentered, verticalCentered,
                comments, formulas, zeroValues, charts, drawings, objects)

Choose what is printed with a sheet, as LibreOffice keeps it in the page style: gridLines and headings (row and column headers) join style:print, the centring is style:table-centering. Each keyword is a Bool; only those given change.

The rest are the other settings of the page style's Sheet tab in LibreOffice: comments, formulas (formulas instead of their results), zeroValues, charts, drawings (drawing objects) and objects (pictures and other objects). LibreOffice prints charts, drawings, objects and zero values unless told not to.

source
OpenDocumentSpreadsheets.setPrintArea — Function
setPrintArea(sheet, rng)

Print only the cells in rng: a cell range ("A1:F40"), several separated by commas or ~ ("A1:F40,H1:K10"), or a defined name. Stored as LibreOffice stores it, in the table's table:print-ranges (Sheet1.A1:Sheet1.F40). Replaces any print area the sheet has.

source
OpenDocumentSpreadsheets.getPrintArea — Function
getPrintArea(sheet) -> Union{Nothing, CellRange, NonContiguousRange, String}

The print area: a CellRange, a NonContiguousRange of several, nothing if none, or its text when it isn't cells of the sheet. Works on read-only files.

source
OpenDocumentSpreadsheets.setPrintTitles — Function
setPrintTitles(sheet; rows=nothing, cols=nothing)

Repeat rows at the top of every printed page, and columns at the left. rows is a row number, a range (1:2) or a string ("1:2"); cols a column number, a range or a string ("A:B"). They are the table's table:table-header-rows and -columns, as LibreOffice stores them. They replace any titles the sheet has; the one not given is kept.

source
OpenDocumentSpreadsheets.setHeaderFooter — Function
setHeaderFooter(sheet; header, footer, firstHeader, firstFooter, evenHeader, evenFooter,
                differentFirst, differentOddEven)

Set the headers and footers printed on a sheet's pages: a string (centred) or a NamedTuple of left, center and right sections, with codes (&P page, &N pages, &D, &T, &F, &Z, &A, fonts from headerFooterFont, && for &). They are written as ODF fields, sections as regions, fonts as text styles; first-page and even-page headers are style:header-first and style:header-left. "" removes one. Giving firstHeader/firstFooter turns differentFirst on, and evenHeader/evenFooter differentOddEven.

Showing or hiding a header or footer keeps the margins as setPageMargins measures them: the page style's are worked out from them again. scaleWithDoc and alignWithMargins have no LibreOffice counterpart: only their defaults (true) are accepted.

source
OpenDocumentSpreadsheets.getHeaderFooter — Function
getHeaderFooter(sheet) -> Union{Nothing, NamedTuple}

The headers and footers, or nothing if none is shown: header, footer, evenHeader, evenFooter, firstHeader, firstFooter (each (left, center, right) with the codes setHeaderFooter takes, or nothing), differentOddEven, differentFirst, and scaleWithDoc, alignWithMargins (always true). The file's fields become those codes, and fonts that differ from the headers' commonest one become font codes. A sheet without a page style of its own shows LibreOffice's default (the sheet's name, and "Page &P"). Works on read-only files.

source
OpenDocumentSpreadsheets.headerFooterField — Function
headerFooterField(field::Symbol) -> String

The code for field in a header or footer: :page &P, :pages &N, :date &D, :time &T, :file &F, :path &Z, :sheet &A. Each is written as the field LibreOffice's Header/Footer dialog inserts for it.

source
OpenDocumentSpreadsheets.headerFooterFont — Function
headerFooterFont(; name, bold, italic, under, strike, size, color, vertAlign) -> String

The codes that change the font of the text that follows them in a header or footer (&"Arial,Bold"&14). OpenDocumentSpreadsheets writes the text after them in a text style with that font. color takes OpenDocumentSpreadsheets' colour forms (not theme colours).

source

Document properties

The file's properties and custom properties, kept in meta.xml as LibreOffice keeps them:

OpenDocumentSpreadsheets.setDocumentProperties — Function
setDocumentProperties(ods; title, subject, creator, keywords, description, lastModifiedBy,
                      category, contentStatus, created, modified, company, manager)

Set the file's document properties, as LibreOffice's File → Properties shows them. Only the keywords given change; "" removes one. They are stored in the file's metadata:

  • title, subject, description: dc:title, dc:subject, dc:description
  • creator: meta:initial-creator; lastModifiedBy: dc:creator
  • keywords: one meta:keyword for each part between ; or ,
  • created, modified (Date or DateTime): meta:creation-date, dc:date
  • category, contentStatus, company, manager, which OpenDocument has no fields for: custom properties, under the names LibreOffice uses for them (OOXMLCorePropertyCategory, OOXMLCorePropertyContentStatus, Company, Manager), which getCustomProperties leaves out

OpenDocumentSpreadsheets never changes modified or lastModifiedBy when it saves a file (LibreOffice does).

source
OpenDocumentSpreadsheets.setCustomProperty — Function
setCustomProperty(ods, name, value)

Set the custom document property name (replacing one of that name, without regard to case) to a string, a number, a Bool, or a Date or DateTime. Stored as LibreOffice's user-defined properties are: numbers as float, dates and date-times as date. The four names that hold the category, content status, company and manager are set with setDocumentProperties.

source
OpenDocumentSpreadsheets.getCustomProperties — Function
getCustomProperties(ods) -> Vector{Pair{String,Any}}

The file's custom document properties, in the file's order: String, Int64 (a whole float, on 32-bit Julia too), Float64, Bool or DateTime values, or the text for other types. The four that hold the category, content status, company and manager are left out (they are getDocumentProperties's). Works on read-only files.

source