ODS (.ods)
- Import fully supports the ODS standard.
Background & Context
![](Files/ODS.en/details_1.png)
-
- 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
![](Files/ODS.en/details_2.png)
- 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 {s1, s2, …}, where the si 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 following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements
![](Files/ODS.en/details_3.png)
![](Files/ODS.en/details_4.png)
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Data" list of full arrays, representing all sheets "Formulas" all ODS formulas as text - Import by default uses the "Data" 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 {f1,f2,…}, where the fi are arrays corresponding to the sheets of an ODS file.
- Importing parts of a data sheet:
-
"Data",k the k sheet, given as an array
"Data",k,m row m of the k sheet
"Data",k,m,n cell {m,n} of the k 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",name sheet name as an array "Sheets",name,m row m of sheet name "Sheets",name,m,n cell {m,n} in sheet name - Import["file.ods",{"Sheets",All}] is equivalent to Import["file.ods","Data"].
- Import yields spreadsheets as full rectangular arrays.