writeData Write an object to a worksheet
Description
Write an object to worksheet with optional styling.
Usage
writeData(wb, sheet, x, startCol = 1, startRow = 1, xy = NULL,
colNames = TRUE, rowNames = FALSE, headerStyle = NULL,
borders = c("none", "surrounding", "rows", "columns", "all"),
borderColour = getOption("openxlsx.borderColour", "black"),
borderStyle = getOption("openxlsx.borderStyle", "thin"),
withFilter = FALSE, keepNA = FALSE, name = NULL, sep = ", ")
Arguments
wb A Workbook object containing a worksheet.
sheet The worksheet to write to. Can be the worksheet index or name.
x Object to be written. For classes supported look at the examples.
startCol A vector specifying the starting column to write to.
startRow A vector specifying the starting row to write to.
xy An alternative to specifying startCol and startRow individually. A vector of
the form c(startCol, startRow).
colNames If TRUE, column names of x are written.
rowNames If TRUE, data.frame row names of x are written.
headerStyle Custom style to apply to column names.
borders Either "none" (default), "surrounding", "columns", "rows" or respective abbreviations.
If "surrounding", a border is drawn around the data. If "rows",
a surrounding border is drawn with a border around each row. If "columns", a
surrounding border is drawn with a border between each column. If "all" all
cell borders are drawn.
borderColour Colour of cell border. A valid colour (belonging to colours() or a hex colour
code, eg see here).
borderStyle Border line style
• none no border
• thin thin border
• medium medium border
• dashed dashed border
• dotted dotted border
• thick thick border
|