Read and Write ODS Files

Import ODS (OpenDocument Spreadsheet) into R as a data frame. Also support writing data frame into ODS file.


read ODS files into R

ODS (Open Document Spreadsheets) files are basically a zip file with all the stuff in it. The file contents.xml is a XML file containing all the numbers and formulas used in the ODS spreadsheets.

From the CRAN with

install.packages("readODS")
library(readODS)

From github with the devtools package WARNING: THIS MAY BE UNSTABLE!

if(!require(devtools)){
    install.packages("devtools")
    library(devtools)
}
detach("package:readODS")
remove.packages("readODS")
install_github(repo="readODS", username ="chainsawriot", ref="master")
library(readODS)
read_ods("table.ods", header = TRUE) ## return only the first sheet
read_ods("multisheet.ods", sheet = 2, formula_as_formula = TRUE) ## return the second sheet with formula read as formula
read.ods("multisheet.ods") ## for backward compatibility purpose, not recommended.

Various ods files generated by LibreOffice Calc and Google Sheets have been tested. The package has been tested on Debian 8.

GPL3

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("readODS")

1.6.4 by Chung-hong Chan, 10 months ago


Browse source code at https://github.com/cran/readODS


Authors: Gerrit-Jan Schutten, Chung-hong Chan, Thomas J. Leeper


Documentation:   PDF Manual  


GPL-3 license


Imports xml2, cellranger, readr

Suggests dplyr, testthat, datasets


Imported by SchemaOnRead, elementR, readtext.

Suggested by rio.


See at CRAN