Learn R Programming

gnumeric (version 0.7-10)

read.gnumeric.sheets: Read each sheet from a gnumeric spreadsheet file

Description

Read data from each non-empty sheet of a gnumeric file to a list of data.frames.

All arguments are passed to read.gnumeric.sheet.

Usage

read.gnumeric.sheets(file,
                     head=FALSE,
                     drop.empty.rows="none",
                     drop.empty.columns="none",
                     colnames.as.sheet=FALSE,
                     rownames.as.sheet=colnames.as.sheet,
                     quiet=TRUE,
                     LANG='C',                  
                     locale='C',                
                     import.encoding=NA,        
                     field.format='automatic',  
                     ...  
                     );

Value

A list of data frames.

Arguments

file

Name of gnumeric file to read from.

head, drop.empty.rows, drop.empty.columns

See read.gnumeric.sheet

colnames.as.sheet,rownames.as.sheet, quiet

See read.gnumeric.sheet

LANG, locale, import.encoding, field.format, ...

See read.gnumeric.sheet

See Also

read.gnumeric.sheet.info to list sheet names and sizes.

read.gnumeric.range to read an exact cell range of a single sheet.

Examples

Run this code
## Read all sheets from 'file.gnumeric'
if (FALSE) {
df.list <- read.gnumeric.sheets( file="file.gnumeric" );

df1 <- df.list['Sheet1'];

df.list <- read.gnumeric.sheets( file="file.gnumeric",
                                 head=TRUE );

names(df.list); ## sheet names
}

Run the code above in your browser using DataLab