Learn R Programming

openxlsx2 (version 1.4)

wb_data: Add the wb_data attribute to a data frame in a worksheet

Description

provide wb_data object as mschart input

Usage

wb_data(wb, sheet = current_sheet(), dims, ...)

# S3 method for wb_data [( x, i, j, drop = ifelse((missing(j) && length(i) > 1) || (!missing(i) && length(j) > 1), FALSE, TRUE) )

Value

A data frame of class wb_data.

Arguments

wb

a workbook

sheet

a sheet in the workbook either name or index

dims

the dimensions

...

additional arguments for wb_to_df(). Be aware that not every argument is valid.

x

x

i

i

j

j

drop

drop

See Also

wb_to_df() wb_add_mschart(), wb_add_pivot_table()

Examples

Run this code
 wb <- wb_workbook() %>%
   wb_add_worksheet() %>%
   wb_add_data(x = mtcars, dims = "B2")

 wb_data(wb, 1, dims = "B2:E6")

Run the code above in your browser using DataLab