generate_workbook: Generate A Workbook Object From An 'a11ytable'

View source: R/workbook.R

generate_workbookR Documentation

Generate A Workbook Object From An 'a11ytable'

Description

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

# Convert an a11ytable to a Workbook-class object
x <- generate_workbook(demo_a11ytable)
class(x)

# As above, using a compliant data.frame and the base pipe
y <- demo_df |>
  as_a11ytable() |>
  generate_workbook()


matt-dray/a11ytables documentation built on May 31, 2024, 2:39 p.m.