Learn R Programming

readODS (version 2.3.0)

list_ods_sheets: Get information in an (F)ODS File

Description

list_ods_sheets lists all sheets in an (f)ods file. The function can be used for listing sheets in both ods and flat ods files. (list_fods_sheets) is also available, which can only list sheets in flat ods files.

Usage

list_ods_sheets(
  path,
  include_external_data = FALSE,
  ods_format = c("auto", "ods", "fods"),
  guess = FALSE
)

list_fods_sheets(path, include_external_data = FALSE)

ods_sheets(path)

Value

A character vector of sheet names

Arguments

path

Path to the (f)ods file

include_external_data

A boolean value to show or hide sheets containing archived linked data (default false)

ods_format

character, must be "auto", "ods" or "fods". The default "auto" is to determine the format automatically. By default, the format is determined by file extension, unless guess is FALSE.

guess

logical, If the file extension is absent or not recognized, this controls whether we attempt to guess format based on the file signature or "magic number".

Author

Peter Brohan peter.brohan+cran@gmail.com, Chung-hong Chan chainsawtiney@gmail.com, Gerrit-Jan Schutten phonixor@gmail.com

Details

The default "include_external_data" for ods_sheets is TRUE to maintain compatibility with version 1 of readODS. It will change to TRUE in version 3.

See Also

use read_ods to read the data

Examples

Run this code
if (FALSE) {
# Get the list of names of sheets
list_ods_sheets("starwars.ods")
list_ods_sheets("starwars.fods")
# Using list_fods_sheets, although you don't have to
list_fods_sheets("starwars.fods")
}

Run the code above in your browser using DataLab