Combine brainstorm functions to add Excel worksheet. For finer control, functions can be called individually. Depends on the openxlsx package.

add_worksheet(
  wb,
  sheet,
  table,
  header = h1(),
  row1 = r1(),
  row2 = r2(),
  sc = 1,
  sr = 1,
  cw = 30,
  rh = 20,
  fc = F,
  fr = T,
  fac = NULL,
  far = NULL,
  tab = "#1A1B41",
  ...
)

Arguments

wb

openxlsx Workbook object.

sheet

Worksheet name.

table

Table to add to worksheet.

header

Header openxlsx style object generated by brainstorm::h1().

row1

Primary row openxlsx style object generated by brainstorm::r1().

row2

Secondary row openxlsx style object generated by brainstorm::r2().

sc

Starting column to write to.

sr

Starting row to write to.

cw

Vector of column widths or "auto" for automatic sizing.

rh

Vector of row heights or "auto" for automatic sizing.

fc

If TRUE, freezes first column. To freeze more than the first column, set as FALSE and specify fac.

fr

If TRUE, freezes first row. To freeze more than the first row, set as FALSE and specify far.

fac

First active column, where fac = 2 is equivalent to fc = TRUE.

far

First active row, where far = 2 is equivalent to fr = TRUE.

tab

Tab color of worksheet.

...

Other arguments to be passed to openxlsx::addWorksheet().

Author

Ayush Noori