ODS (.ods)

MIME type: application/vnd.oasis.opendocument.spreadsheet
OpenDocument spreadsheet file.
Used for storage and exchange of spreadsheet data and formulas.
Is part of the OASIS Open Document Format (ODF) family of file formats.
ODS is an acronym derived from OpenDocument Spreadsheet.
Native spreadsheet format of OpenOffice.org 2.0.
XML-based format, usually ZIP-compressed.
Supports multiple sheets in one file.
Developed by the OASIS industry consortium, based upon the OpenOffice.org SXC format.
Approved as ISO/IEC 26300 standard in 2006.
  • Import fully supports the ODS standard.

Import and ExportImport and Export

  • Import["file.ods"] imports all sheets of an ODS file, returning the result as a list of arrays.
  • Import["file.ods"] returns the sheets of an ODS file as an expression of the form where the are full arrays containing numerical and textual data, Boolean values, and date specifications.
  • Import["file.ods",elem] imports the specified element from an ODS file.
  • Import["file.ods",{elem,suba,subb,}] imports a subelement.
  • Import["file.ods",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","ODS"] or Import["file",{"ODS",elem,}].
  • See the reference pages for full general information on Import.
  • ImportString supports the ODS format.

ElementsElements

  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"list of full arrays, representing all sheets
    "Formulas"all ODS formulas as text
  • Import by default uses the element.
  • ODS data is represented in the Wolfram Language by real or integer numbers, strings, Boolean values True and False, and DateList specifications.
  • ODS error cells are imported as $Failed.
  • Import["file.ods","Formulas"] gives spreadsheet formulas for each cell in the form where the are arrays corresponding to the sheets of an ODS file.
  • Importing parts of a data sheet:
  • "Data",kthe k^(th) sheet, given as an array
    "Data",k,mrow m of the k^(th) sheet
    "Data",k,m,ncell of the k^(th) sheet
  • Import["file.ods",{"Data",1}] returns the first sheet as an array.
  • The following can be used to select or specify individual sheets by name:
  • "Sheets"list of sheet names
    "Sheets",namesheet name as an array
    "Sheets",name,mrow m of sheet name
    "Sheets",name,m,ncell in sheet name
  • Import["file.ods",{"Sheets",All}] is equivalent to Import["file.ods","Data"].
  • Import yields spreadsheets as full rectangular arrays.

OptionsOptions

  • Import option:
  • "EmptyField"""how empty cells are represented in the Wolfram Language

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Import tabular data from an ODS file and format it as a table:

In[1]:=
Click for copyable input
Out[1]//TableForm=
Introduced in 2007
(6.0)