appendWorksheet-methods

0th

Percentile

Appending data to worksheets

Appends data to worksheets of a '>workbook.

Keywords
methods, IO
Usage
# S4 method for workbook,ANY,character
appendWorksheet(object,data,sheet,header,rownames)
# S4 method for workbook,ANY,numeric
appendWorksheet(object,data,sheet,header,rownames)
Arguments
object

The '>workbook to write to

data

Data to append

sheet

The name or index of the sheet to append the data to

header

Specifies if the column names should be written. The default is TRUE.

rownames

Name (character) of column to use for the row names of the provided data object. If specified, the row names of the data object (data.frame) will be included as an additional column with the specified name. If rownames = NULL (default), no row names will be included.

Details

Appends data to the worksheet specified by sheet. Data will be appended at the bottom and left most column containing some data. If more complex "appending schemes" are required you may make direct use of writeWorksheet.

See Also

'>workbook, writeWorksheet, readWorksheet, writeNamedRegion, appendNamedRegion, readNamedRegion

Aliases
  • appendWorksheet
  • appendWorksheet-methods
  • appendWorksheet,workbook,ANY,character-method
  • appendWorksheet,workbook,ANY,numeric-method
Examples
# NOT RUN {
# mtcars xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")

# Load workbook
wb <- loadWorkbook(demoExcelFile)

# Append mtcars data set to worksheet named 'mtcars'
appendWorksheet(wb, mtcars, sheet = "mtcars")
# }
Documentation reproduced from package XLConnect, version 0.2-14, License: GPL-3

Community examples

Looks like there are no examples yet.