Skip to contents

Populate an 'openxlsx' Workbook-class object with content from an a11ytable-class object. In turn, the output can be passed to saveWorkbook from 'openxlsx'

Usage

generate_workbook(a11ytable)

Arguments

a11ytable

An a11ytable-class object created using create_a11ytable (or as_a11ytable), which contains the data and information needed to create a workbook.

Value

A Workbook-class object.

Examples

if (FALSE) {
# Create an a11ytable with in-built demo dataframe, mtcars_df
x <- as_a11ytable(mtcars_df)

# Convert to a Workbook-class object
generate_workbook(x)

# As above, using a base pipe
mtcars_df |>
  as_a11ytable() |>
  generate_workbook()

# You can also use the RStudio Addin installed with the package to insert a
# an example skeleton containing this function.
}