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

View source: R/read.R

wb_dataR Documentation

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 class 'wb_data'

  x[
  i,
  j,
  drop = ifelse((missing(j) && length(i) > 1) || (!missing(i) && length(j) > 1), FALSE,
    TRUE)
]

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

Value

A data frame of class wb_data.

See Also

wb_to_df() wb_add_mschart(), wb_add_pivot_table()

Examples

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

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

openxlsx2 documentation built on Oct. 18, 2024, 1:07 a.m.