Open ODS File

Information, tips and instructions

Read ODS file with Matlab

Calc files, spreadsheets, especially ODS can be read through matrices or MATLAB arrays. There is the possibility of importing data from spreadsheets interactively by programming or through a series of specific commands. You can import a selected range of data or import different spreadsheets from spreadsheet files.

ODS is the usual saving format for tables without macros in LibreOffice Calc. Therefore, it is a completely normal spreadsheet in whose tables you can perform operations or create diagrams. Starting with this version, Calc uses the XML-based ODS file format by default. Compared to XLSX file is a kind of compressed folder where the XML and graphic files displayed in the spreadsheet are stored. The different parts of the document, such as tables or text, are saved individually and consolidated in the file.

MATLAB is a computing and numerical programming environment that offers an IDE with its own programming language (M language). It is available for Unix, Windows, macOS, and GNU / Linux platforms. Among its basic features are the manipulation of vectors, matrices, data management and implementation of algorithms for digital data and signal processing, as well as the creation of graphical user interfaces.

Due to MatLab's ability to process data and matrices, its use in reading, creating and modifying ODS files is fully feasible.

For reading, the READMATRIX, READTABLE, READCELLS and READVAR commands are used, depending on your needs, you can specify the sheet, the range and the cells you need.

And for writing, you have WRITEMATRIX, WRITETABLE AND WRITECELL

Example of reading a full array from an ODS file

Read matrix from filecollapse all in page

Syntax

  • A = readmatrix (filename)
  • A = readmatrix (filename, opts)
  • A = readmatrix (___, Name, Value)


Description:

A = readmatrix (filename) creates an array by reading column-oriented data from a file. The readmatrix function performs automatic detection of import parameters for your file.

For files containing mixed numeric and text data, readmatrix imports the data as a numeric array by default.

Example of writing an array to an ODS file

Syntax

  • writematrix (A)
  • writematrix (A, filename)
  • writematrix (___, Name, Value)

Description:

writematrix (A) writes to a CSV file, a comma-delimited array of data. It is important to note that the file will have a TXT extension, which can be perfectly exported to an ODS file.