openxlsx2
openxlsx2 copied to clipboard
`options()` tracking
Organize and track the potential default options. Most of these actually seem to be related to styles.
In openxlsx
these were saved to the named list op.openxlsx
and documented (although in the package document, openxlsx
).
-
bandedCols
-
bandedRows
-
borderColour
-
borders
-
borderStyle
-
compressionLevel
-
creator
(author
?) -
dateFormat
,dateformat
(just keep one) -
datetimeFormat
,datetimeformat
,dateTimeFormat
(just keep one) -
hdpi
-
header
-
headerStyle
-
firstColumn
-
firstFooter
-
firstHeader
-
footer
-
evenFooter
-
evenHeader
-
gridLines
-
keepNA
-
lastColumn
-
na.string
-
maxWidth
-
minWidth
-
numFmt
-
oddFooter
-
oddHeader
-
orientation
-
paperSize
-
showGridLines
-
tabColour
-
tableStyle
-
vdpi
-
withFilter
From `openxlsx::op.openxlsx`
list(
openxlsx.bandedCols = FALSE,
openxlsx.bandedRows = TRUE,
openxlsx.borderColour = "black",
openxlsx.borders = NULL,
openxlsx.borderStyle = "thin",
openxlsx.compressionLevel = 9,
openxlsx.creator = "",
openxlsx.dateFormat = "mm/dd/yyyy",
openxlsx.datetimeFormat = "yyyy-mm-dd hh:mm:ss",
openxlsx.hdpi = 300,
openxlsx.header = NULL,
openxlsx.headerStyle = NULL,
openxlsx.firstColumn = NULL,
openxlsx.firstFooter = NULL,
openxlsx.firstHeader = NULL,
openxlsx.footer = NULL,
openxlsx.evenFooter = NULL,
openxlsx.evenHeader = NULL,
openxlsx.gridLines = TRUE,
openxlsx.keepNA = FALSE,
openxlsx.lastColumn = NULL,
openxlsx.na.string = NULL,
openxlsx.maxWidth = 250,
openxlsx.minWidth = 3,
openxlsx.numFmt = "GENERAL",
openxlsx.oddFooter = NULL,
openxlsx.oddHeader = NULL,
openxlsx.orientation = "portrait",
openxlsx.paperSize = 9,
openxlsx.showGridLines = NA,
openxlsx.tabColour = NULL,
openxlsx.tableStyle = "TableStyleLight9",
openxlsx.vdpi = 300,
openxlsx.withFilter = NULL
)
These will simply be accessed with getOption("pgkname.option")
and not the getOps()
thing I had implemented in openxlsx
Maybe add this to the TODO list after 1.0
Thoughts
- I updated the docs can be accessed with ?openxlsx2::openxlsx2_options
- I listed them as I saw them when opening PRs
- creator could be used in more places
- Once this is finalized, we can polish the docs a bit more. I like the format the tidyverse has been using lately. https://usethis.r-lib.org/reference/usethis_options.html
Yes, I we can handle these later. I don't actually think that the average openxlsx2
user is really setting these in their .Rprofile
files or other profile setups. But we can always revisit this and add as we please.