Convenience wrapper around openxlsx::write.xlsx
to handle some common formatting tasks:
Column headers are title-cased and bolded
Column widths are calculated based on the string representations of the data
Date columns are formatted as DATE instead of LONGDATE
And some optional additions:
Band columns by group
Specify currency columns
Arguments
- report
report
object- report_data
character(1)
name of the field inreport
that contains the data- columns
list
of named expressions mapping column names to their values, will be evaluated in the environment ofattendance_report[[data]]
- ...
Arguments passed on to
write_xlsx
- data
data to write to the spreadsheet
- filename
filename to write
- group
character name of column to be used for grouping/banding the data. Band color will change when column value changes.
- currency
character vector of column to be used for grouping/banding the data. Band color will change when column value changes.
- overwrite
If
TRUE
, overwrite any existing file.