diff --git a/.github/workflows/recheck.yml b/.github/workflows/recheck.yml new file mode 100644 index 00000000..323d2ad3 --- /dev/null +++ b/.github/workflows/recheck.yml @@ -0,0 +1,18 @@ +on: + workflow_dispatch: + inputs: + which: + type: choice + description: Which dependents to check + options: + - strong + - most + +name: Reverse dependency check + +jobs: + revdep_check: + name: Reverse check ${{ inputs.which }} dependents + uses: r-devel/recheck/.github/workflows/recheck.yml@v1 + with: + which: ${{ inputs.which }} diff --git a/.gitignore b/.gitignore index 744d9baa..c9da4ab1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .Rproj.user .Rhistory .RData +.DS_Store src/*.o src/*.so src/*.dll diff --git a/DESCRIPTION b/DESCRIPTION index 1963edd8..be359052 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: openxlsx Title: Read, Write and Edit xlsx Files -Version: 4.2.5.9001 -Date: 2021-12-13 +Version: 4.2.5.9002 +Date: 2024-07-17 Authors@R: c(person(given = "Philipp", family = "Schauberger", @@ -61,7 +61,7 @@ VignetteBuilder: knitr Encoding: UTF-8 Language: en-US -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Collate: 'CommentClass.R' 'HyperlinkClass.R' diff --git a/LICENSE b/LICENSE index bb37d74e..baac1828 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ -YEAR: 2014-2022 +YEAR: 2014-2024 COPYRIGHT HOLDER: openxlsx authors diff --git a/R/build_workbook.R b/R/build_workbook.R index 469724df..63770ff5 100644 --- a/R/build_workbook.R +++ b/R/build_workbook.R @@ -1,39 +1,39 @@ #' Build Workbook -#' +#' #' Build a workbook from a data.frame or named list -#' -#' @details -#' This function can be used as shortcut to create a workbook object from a +#' +#' @details +#' This function can be used as shortcut to create a workbook object from a #' data.frame or named list. If names are available in the list they will be #' used as the worksheet names. The parameters in `...` are collected #' and passed to [writeData()] or [writeDataTable()] to -#' initially create the Workbook objects then appropriate parameters are +#' initially create the Workbook objects then appropriate parameters are #' passed to [setColWidths()]. -#' +#' #' @param x A data.frame or a (named) list of objects that can be handled by #' [writeData()] or [writeDataTable()] to write to file #' @param asTable If `TRUE` will use [writeDataTable()] rather -#' than [writeData()] to write `x` to the file (default: +#' than [writeData()] to write `x` to the file (default: #' `FALSE`) -#' @param ... Additional arguments passed to [writeData()], +#' @param ... Additional arguments passed to [writeData()], #' [writeDataTable()], [setColWidths()] (see Optional #' Parameters) #' @author Jordan Mark Barbone #' @returns A Workbook object -#' +#' #' @details #' columns of x with class Date or POSIXt are automatically #' styled as dates and datetimes respectively. -#' +#' #' @section Optional Parameters: -#' +#' #' **createWorkbook Parameters** -#' \itemize{ +#' \describe{ #' \item{**creator**}{ A string specifying the workbook author} #' } #' #' **addWorksheet Parameters** -#' \itemize{ +#' \describe{ #' \item{**sheetName**}{ Name of the worksheet} #' \item{**gridLines**}{ A logical. If `FALSE`, the worksheet grid lines will be hidden.} #' \item{**tabColour**}{ Colour of the worksheet tab. A valid colour (belonging to colours()) @@ -42,7 +42,7 @@ #' } #' #' **writeData/writeDataTable Parameters** -#' \itemize{ +#' \describe{ #' \item{**startCol**}{ A vector specifying the starting column(s) to write df} #' \item{**startRow**}{ A vector specifying the starting row(s) to write df} #' \item{**xy**}{ An alternative to specifying startCol and startRow individually. @@ -55,50 +55,50 @@ #' between each column. If "`all`" all cell borders are drawn.} #' \item{**borderColour**}{ Colour of cell border} #' \item{**borderStyle**}{ Border line style.} -#' \item{**keepNA**} {If `TRUE`, NA values are converted to #N/A (or `na.string`, if not NULL) in Excel, else NA cells will be empty. Defaults to FALSE.} -#' \item{**na.string**} {If not NULL, and if `keepNA` is `TRUE`, NA values are converted to this string in Excel. Defaults to NULL.} +#' \item{**keepNA**}{If `TRUE`, NA values are converted to #N/A (or `na.string`, if not NULL) in Excel, else NA cells will be empty. Defaults to FALSE.} +#' \item{**na.string**}{If not NULL, and if `keepNA` is `TRUE`, NA values are converted to this string in Excel. Defaults to NULL.} #' } #' #' **freezePane Parameters** -#' \itemize{ -#' \item{**firstActiveRow**} {Top row of active region to freeze pane.} -#' \item{**firstActiveCol**} {Furthest left column of active region to freeze pane.} -#' \item{**firstRow**} {If `TRUE`, freezes the first row (equivalent to firstActiveRow = 2)} -#' \item{**firstCol**} {If `TRUE`, freezes the first column (equivalent to firstActiveCol = 2)} +#' \describe{ +#' \item{**firstActiveRow**}{Top row of active region to freeze pane.} +#' \item{**firstActiveCol**}{Furthest left column of active region to freeze pane.} +#' \item{**firstRow**}{If `TRUE`, freezes the first row (equivalent to firstActiveRow = 2)} +#' \item{**firstCol**}{If `TRUE`, freezes the first column (equivalent to firstActiveCol = 2)} #' } #' #' **colWidths Parameters** -#' \itemize{ -#' \item{**colWidths**} {May be a single value for all columns (or "auto"), or a list of vectors that will be recycled for each sheet (see examples)} +#' \describe{ +#' \item{**colWidths**}{May be a single value for all columns (or "auto"), or a list of vectors that will be recycled for each sheet (see examples)} #' } -#' +#' #' @examples #' x <- data.frame(a = 1, b = 2) #' wb <- buildWorkbook(x) -#' +#' #' y <- list(a = x, b = x, c = x) #' buildWorkbook(y, asTable = TRUE) #' buildWorkbook(y, asTable = TRUE, tableStyle = "TableStyleLight8") -#' +#' #' @seealso [write.xlsx()] -#' +#' #' @export buildWorkbook <- function(x, asTable = FALSE, ...) { if (!is.logical(asTable)) { stop("asTable must be a logical.") } - + params <- list(...) isList <- inherits(x, "list") - + if (isList) { params[["sheetName"]] <- params[["sheetName"]] %||% names(x) %||% paste0("Sheet ", seq_along(x)) } - + ## create new Workbook object wb <- do_call_params(createWorkbook, params) - + ## If a list is supplied write to individual worksheets using names if available if (isList) { do_call_params(addWorksheet, params, wb = list(wb), .map = TRUE) @@ -106,16 +106,16 @@ buildWorkbook <- function(x, asTable = FALSE, ...) { params[["sheetName"]] <- params[["sheetName"]] %||% "Sheet 1" do_call_params(addWorksheet, params, wb = wb) } - + params[["sheet"]] <- params[["sheet"]] %||% params[["sheetName"]] - + # write Data if (asTable) { do_call_params(writeDataTable, params, x = x, wb = list(wb), .map = TRUE) } else { do_call_params(writeData, params, x = x, wb = wb, .map = TRUE) } - + do_setColWidths(wb, x, params, isList) do_call_params(freezePane, params, wb = list(wb), .map = TRUE) wb @@ -126,18 +126,18 @@ do_setColWidths <- function(wb, x, params, isList) { if (!isList) { x <- list(x) } - + params[["startCol"]] <- params[["startCol"]] %||% 1 params[["startCol"]] <- rep_len(list(params[["startCol"]]), length.out = length(x)) params[["colWidths"]] <- params[["colWidths"]] %||% "" params[["colWidths"]] <- rep_len(as.list(params[["colWidths"]]), length.out = length(x)) - + for (i in seq_along(wb[["worksheets"]])) { if (identical(params[["colWidths"]][[i]], "auto")) { setColWidths( wb, sheet = i, - cols = seq_along(x[[i]]) + params[["startCol"]][[i]] - 1L, + cols = seq_along(x[[i]]) + params[["startCol"]][[i]] - 1L, widths = "auto" ) } else if (!identical(params[["colWidths"]][[i]], "")) { diff --git a/R/wrappers.R b/R/wrappers.R index b1a2eebe..3e625ea4 100644 --- a/R/wrappers.R +++ b/R/wrappers.R @@ -207,11 +207,11 @@ int2col <- function(x) { #' @examples #' col2int(LETTERS) col2int <- function(x) { - + if (!is.character(x)) { stop("x must be character") } - + as.integer(sapply(x, cell_ref_to_col)) } @@ -305,7 +305,7 @@ sheets <- function(wb) { #' @param hdpi Horizontal DPI. Can be set with options("openxlsx.dpi" = X) or options("openxlsx.hdpi" = X) #' @param vdpi Vertical DPI. Can be set with options("openxlsx.dpi" = X) or options("openxlsx.vdpi" = X) #' @details Headers and footers can contain special tags -#' \itemize{ +#' \describe{ #' \item{**&\[Page\]**}{ Page number} #' \item{**&\[Pages\]**}{ Number of pages} #' \item{**&\[Date\]**}{ Current date} @@ -638,13 +638,13 @@ convertFromExcelRef <- function(col) { #' \item{**FRACTION**} #' \item{**SCIENTIFIC**} #' \item{**TEXT**} -#' \item{**COMMA**{ for comma separated thousands}} +#' \item{**COMMA** for comma separated thousands} #' \item{For date/datetime styling a combination of d, m, y and punctuation marks} #' \item{For numeric rounding use "0.00" with the preferred number of decimal places} #' } #' #' @param border Cell border. A vector of "top", "bottom", "left", "right" or a single string). -#' \itemize{ +#' \describe{ #' \item{**"top"**}{ Top border} #' \item{**bottom**}{ Bottom border} #' \item{**left**}{ Left border} @@ -659,7 +659,7 @@ convertFromExcelRef <- function(col) { #' A valid colour (belonging to colours()) or a valid hex colour beginning with "#" #' #' @param borderStyle Border line style vector the same length as the number of sides specified in "border" -#' \itemize{ +#' \describe{ #' \item{**none**}{ No Border} #' \item{**thin**}{ thin border} #' \item{**medium**}{ medium border} @@ -684,7 +684,7 @@ convertFromExcelRef <- function(col) { #' #' @param halign #' Horizontal alignment of cell contents -#' \itemize{ +#' \describe{ #' \item{**left**}{ Left horizontal align cell contents} #' \item{**right**}{ Right horizontal align cell contents} #' \item{**center**}{ Center horizontal align cell contents} @@ -693,7 +693,7 @@ convertFromExcelRef <- function(col) { #' #' @param valign A name #' Vertical alignment of cell contents -#' \itemize{ +#' \describe{ #' \item{**top**}{ Top vertical align cell contents} #' \item{**center**}{ Center vertical align cell contents} #' \item{**bottom**}{ Bottom vertical align cell contents} @@ -701,7 +701,7 @@ convertFromExcelRef <- function(col) { #' #' @param textDecoration #' Text styling. -#' \itemize{ +#' \describe{ #' \item{**bold**}{ Bold cell contents} #' \item{**strikeout**}{ Strikeout cell contents} #' \item{**italic**}{ Italicise cell contents} @@ -1817,10 +1817,10 @@ deleteData <- function(wb, sheet, cols, rows, gridExpand = FALSE) { #' @param col A column to delete #' @export #' @examples -#' ## write some data +#' ## write some data #' wb <- createWorkbook() #' addWorksheet(wb, "tester") -#' +#' #' for (i in seq(5)) { #' mat <- data.frame(x = rep(paste0(int2col(i), i), 10)) #' writeData(wb, sheet = 1, startRow = 1, startCol = i, mat) @@ -2003,7 +2003,7 @@ getBaseFont <- function(wb) { #' @param firstHeader document header for first page only. #' @param firstFooter document footer for first page only. #' @details Headers and footers can contain special tags -#' \itemize{ +#' \describe{ #' \item{**&\[Page\]**}{ Page number} #' \item{**&\[Pages\]**}{ Number of pages} #' \item{**&\[Date\]**}{ Current date} @@ -2159,7 +2159,7 @@ setHeaderFooter <- function(wb, sheet, #' @export #' @details #' paperSize is an integer corresponding to: -#' \itemize{ +#' \describe{ #' \item{**1**}{ Letter paper (8.5 in. by 11 in.)} #' \item{**2**}{ Letter small paper (8.5 in. by 11 in.)} #' \item{**3**}{ Tabloid paper (11 in. by 17 in.)} @@ -2804,7 +2804,7 @@ names.Workbook <- function(x) { #' @param cols Numeric vector specifying columns to include in region #' @param name Name for region. A character vector of length 1. Note region names musts be case-insensitive unique. #' @param overwrite Boolean. Overwrite if exists ? Default to FALSE -#' +#' #' @details Region is given by: min(cols):max(cols) X min(rows):max(rows) #' @export #' @seealso [getNamedRegions()] @@ -2838,7 +2838,7 @@ names.Workbook <- function(x) { #' ## delete one #' deleteNamedRegion(wb = wb, name = "iris2") #' getNamedRegions(wb) -#' +#' #' ## read named regions #' df <- read.xlsx(wb, namedRegion = "iris") #' head(df) @@ -2846,7 +2846,7 @@ names.Workbook <- function(x) { #' df <- read.xlsx(out_file, namedRegion = "iris2") #' head(df) #' } -#' +#' #' @rdname NamedRegion createNamedRegion <- function(wb, sheet, cols, rows, name, overwrite = FALSE) { op <- get_set_options() @@ -2876,12 +2876,12 @@ createNamedRegion <- function(wb, sheet, cols, rows, name, overwrite = FALSE) { stop(sprintf("Named region with name '%s' already exists! Use overwrite = TRUE if you want to replace it", name)) } else if (tolower(name) %in% ex_names & overwrite) { wb$workbook$definedNames <- wb$workbook$definedNames[!ex_names %in% tolower(name)] - } - + } + if (grepl("^[A-Z]{1,3}[0-9]+$", name)) { stop("name cannot look like a cell reference.") } - + cols <- round(cols) rows <- round(rows) @@ -2903,20 +2903,20 @@ createNamedRegion <- function(wb, sheet, cols, rows, name, overwrite = FALSE) { #' @export #' @rdname NamedRegion deleteNamedRegion <- function(wb, name) { - + if (!"Workbook" %in% class(wb)) { stop("First argument must be a Workbook.") } - + ex_names <- regmatches(wb$workbook$definedNames, regexpr('(?<=name=")[^"]+', wb$workbook$definedNames, perl = TRUE)) ex_names <- tolower(replaceXMLEntities(ex_names)) - + if (tolower(name) %in% ex_names) { wb$workbook$definedNames <- wb$workbook$definedNames[!ex_names %in% tolower(name)] } else { warning(sprintf("Cannot find Named region with name '%s'", name)) } - + invisible(0) } @@ -2963,7 +2963,7 @@ deleteNamedRegion <- function(wb, name) { #' df <- read.xlsx(out_file, namedRegion = "iris2") #' head(df) #' } -#' +#' getNamedRegions <- function(x) { UseMethod("getNamedRegions", x) } diff --git a/R/writeData.R b/R/writeData.R index acf4e261..a43ab146 100644 --- a/R/writeData.R +++ b/R/writeData.R @@ -22,9 +22,9 @@ #' a surrounding border is drawn with a border around each row. If #' "`columns`", a surrounding border is drawn with a border between #' each column. If "`all`" all cell borders are drawn. -#' @param borderColour Colour of cell border. A valid colour (belonging to `colours()` or a hex colour code, eg see [here](https://www.w3schools.com/web-design/color-picker/)). +#' @param borderColour Colour of cell border. A valid colour (belonging to `colours()` or a hex colour code, eg see [here](https://www.w3schools.com/colors/colors_picker.asp)). #' @param borderStyle Border line style -#' \itemize{ +#' \describe{ #' \item{**none**}{ no border} #' \item{**thin**}{ thin border} #' \item{**medium**}{ medium border} @@ -180,20 +180,20 @@ writeData <- function( ) { x <- force(x) - + op <- get_set_options() on.exit(options(op), add = TRUE) - + if (!missing(row.names)) { warning("Please use 'rowNames' instead of 'row.names'", call. = FALSE) rowNames <- row.names } - + if (!missing(col.names)) { warning("Please use 'colNames' instead of 'col.names'", call. = FALSE) colNames <- col.names } - + # Set NULLs borders <- borders %||% "none" borderColour <- borderColour %||% "black" @@ -220,7 +220,7 @@ writeData <- function( } startRow <- as.integer(startRow) - + assert_class(wb, "Workbook") assert_true_false(colNames) assert_true_false(rowNames) @@ -311,7 +311,7 @@ writeData <- function( x = c(startRow, startRow + nRow + colNames - 1L), y = c(startCol, startCol + nCol - 1L) ) - + ref <- stri_join(getCellRefs(coords), collapse = ":") wb$worksheets[[sheetX]]$autoFilter <- sprintf('', ref) l <- convert_to_excel_ref(cols = unlist(coords[, 2]), LETTERS = LETTERS) @@ -347,7 +347,7 @@ writeData <- function( if (inherits(headerStyle, "Style") & colNames) { addStyle( wb = wb, - sheet = sheet, + sheet = sheet, style = headerStyle, rows = startRow, cols = 0:(nCol - 1) + startCol, @@ -525,7 +525,7 @@ writeFormula <- function( array = FALSE, xy = NULL ) { - + if (!is.character(x)) { stop("x must be a character vector.") } @@ -556,7 +556,7 @@ writeFormula <- function( #' #' This function exists to prevent conflicts with `as.character.formula` methods #' from other packages -#' +#' #' @inheritParams base::as.character #' @param ... Not implemented #' @returns `base::as.character.default(x)` diff --git a/man/addWorksheet.Rd b/man/addWorksheet.Rd index b79e6438..f33f9fd4 100644 --- a/man/addWorksheet.Rd +++ b/man/addWorksheet.Rd @@ -64,7 +64,7 @@ Add a worksheet to a Workbook object } \details{ Headers and footers can contain special tags -\itemize{ +\describe{ \item{\strong{&[Page]}}{ Page number} \item{\strong{&[Pages]}}{ Number of pages} \item{\strong{&[Date]}}{ Current date} diff --git a/man/buildWorkbook.Rd b/man/buildWorkbook.Rd index a5bdf656..4fd7aec1 100644 --- a/man/buildWorkbook.Rd +++ b/man/buildWorkbook.Rd @@ -39,12 +39,12 @@ styled as dates and datetimes respectively. \strong{createWorkbook Parameters} -\itemize{ +\describe{ \item{\strong{creator}}{ A string specifying the workbook author} } \strong{addWorksheet Parameters} -\itemize{ +\describe{ \item{\strong{sheetName}}{ Name of the worksheet} \item{\strong{gridLines}}{ A logical. If \code{FALSE}, the worksheet grid lines will be hidden.} \item{\strong{tabColour}}{ Colour of the worksheet tab. A valid colour (belonging to colours()) @@ -53,7 +53,7 @@ or a valid hex colour beginning with "#".} } \strong{writeData/writeDataTable Parameters} -\itemize{ +\describe{ \item{\strong{startCol}}{ A vector specifying the starting column(s) to write df} \item{\strong{startRow}}{ A vector specifying the starting row(s) to write df} \item{\strong{xy}}{ An alternative to specifying startCol and startRow individually. @@ -66,21 +66,21 @@ data. If "rows", a surrounding border is drawn a border around each row. If "co between each column. If "\code{all}" all cell borders are drawn.} \item{\strong{borderColour}}{ Colour of cell border} \item{\strong{borderStyle}}{ Border line style.} -\item{\strong{keepNA}} {If \code{TRUE}, NA values are converted to #N/A (or \code{na.string}, if not NULL) in Excel, else NA cells will be empty. Defaults to FALSE.} -\item{\strong{na.string}} {If not NULL, and if \code{keepNA} is \code{TRUE}, NA values are converted to this string in Excel. Defaults to NULL.} +\item{\strong{keepNA}}{If \code{TRUE}, NA values are converted to #N/A (or \code{na.string}, if not NULL) in Excel, else NA cells will be empty. Defaults to FALSE.} +\item{\strong{na.string}}{If not NULL, and if \code{keepNA} is \code{TRUE}, NA values are converted to this string in Excel. Defaults to NULL.} } \strong{freezePane Parameters} -\itemize{ -\item{\strong{firstActiveRow}} {Top row of active region to freeze pane.} -\item{\strong{firstActiveCol}} {Furthest left column of active region to freeze pane.} -\item{\strong{firstRow}} {If \code{TRUE}, freezes the first row (equivalent to firstActiveRow = 2)} -\item{\strong{firstCol}} {If \code{TRUE}, freezes the first column (equivalent to firstActiveCol = 2)} +\describe{ +\item{\strong{firstActiveRow}}{Top row of active region to freeze pane.} +\item{\strong{firstActiveCol}}{Furthest left column of active region to freeze pane.} +\item{\strong{firstRow}}{If \code{TRUE}, freezes the first row (equivalent to firstActiveRow = 2)} +\item{\strong{firstCol}}{If \code{TRUE}, freezes the first column (equivalent to firstActiveCol = 2)} } \strong{colWidths Parameters} -\itemize{ -\item{\strong{colWidths}} {May be a single value for all columns (or "auto"), or a list of vectors that will be recycled for each sheet (see examples)} +\describe{ +\item{\strong{colWidths}}{May be a single value for all columns (or "auto"), or a list of vectors that will be recycled for each sheet (see examples)} } } diff --git a/man/createStyle.Rd b/man/createStyle.Rd index 1e5179c1..a599b8a0 100644 --- a/man/createStyle.Rd +++ b/man/createStyle.Rd @@ -48,13 +48,13 @@ or one of colours(). If fontColour is NULL, the workbook base font colours is us \item{\strong{FRACTION}} \item{\strong{SCIENTIFIC}} \item{\strong{TEXT}} -\item{\strong{COMMA}{ for comma separated thousands}} +\item{\strong{COMMA} for comma separated thousands} \item{For date/datetime styling a combination of d, m, y and punctuation marks} \item{For numeric rounding use "0.00" with the preferred number of decimal places} }} \item{border}{Cell border. A vector of "top", "bottom", "left", "right" or a single string). -\itemize{ +\describe{ \item{\strong{"top"}}{ Top border} \item{\strong{bottom}}{ Bottom border} \item{\strong{left}}{ Left border} @@ -69,7 +69,7 @@ or one of colours(). If fontColour is NULL, the workbook base font colours is us A valid colour (belonging to colours()) or a valid hex colour beginning with "#"} \item{borderStyle}{Border line style vector the same length as the number of sides specified in "border" -\itemize{ +\describe{ \item{\strong{none}}{ No Border} \item{\strong{thin}}{ thin border} \item{\strong{medium}}{ medium border} @@ -94,7 +94,7 @@ A valid colour (belonging to colours()) or a valid hex colour beginning with "#" A valid colour (belonging to colours()) or a valid hex colour beginning with "#"} \item{halign}{Horizontal alignment of cell contents -\itemize{ +\describe{ \item{\strong{left}}{ Left horizontal align cell contents} \item{\strong{right}}{ Right horizontal align cell contents} \item{\strong{center}}{ Center horizontal align cell contents} @@ -103,14 +103,14 @@ A valid colour (belonging to colours()) or a valid hex colour beginning with "#" \item{valign}{A name Vertical alignment of cell contents -\itemize{ +\describe{ \item{\strong{top}}{ Top vertical align cell contents} \item{\strong{center}}{ Center vertical align cell contents} \item{\strong{bottom}}{ Bottom vertical align cell contents} }} \item{textDecoration}{Text styling. -\itemize{ +\describe{ \item{\strong{bold}}{ Bold cell contents} \item{\strong{strikeout}}{ Strikeout cell contents} \item{\strong{italic}}{ Italicise cell contents} diff --git a/man/deleteDataColumn.Rd b/man/deleteDataColumn.Rd index 751c160a..3b31efa3 100644 --- a/man/deleteDataColumn.Rd +++ b/man/deleteDataColumn.Rd @@ -17,7 +17,7 @@ deleteDataColumn(wb, sheet, col) Deletes the whole column from a workbook, shifting the remaining columns to the left } \examples{ -## write some data +## write some data wb <- createWorkbook() addWorksheet(wb, "tester") diff --git a/man/pageSetup.Rd b/man/pageSetup.Rd index bcd5ef92..2710c62d 100644 --- a/man/pageSetup.Rd +++ b/man/pageSetup.Rd @@ -64,7 +64,7 @@ Set page margins, orientation and print scaling } \details{ paperSize is an integer corresponding to: -\itemize{ +\describe{ \item{\strong{1}}{ Letter paper (8.5 in. by 11 in.)} \item{\strong{2}}{ Letter small paper (8.5 in. by 11 in.)} \item{\strong{3}}{ Tabloid paper (11 in. by 17 in.)} diff --git a/man/setHeaderFooter.Rd b/man/setHeaderFooter.Rd index 3efa717d..fd0a05af 100644 --- a/man/setHeaderFooter.Rd +++ b/man/setHeaderFooter.Rd @@ -37,7 +37,7 @@ Set document headers and footers } \details{ Headers and footers can contain special tags -\itemize{ +\describe{ \item{\strong{&[Page]}}{ Page number} \item{\strong{&[Pages]}}{ Number of pages} \item{\strong{&[Date]}}{ Current date} diff --git a/man/write.xlsx.Rd b/man/write.xlsx.Rd index 43e6d0e6..f67dbc0c 100644 --- a/man/write.xlsx.Rd +++ b/man/write.xlsx.Rd @@ -30,12 +30,12 @@ write a data.frame or list of data.frames to an xlsx file \strong{createWorkbook Parameters} -\itemize{ +\describe{ \item{\strong{creator}}{ A string specifying the workbook author} } \strong{addWorksheet Parameters} -\itemize{ +\describe{ \item{\strong{sheetName}}{ Name of the worksheet} \item{\strong{gridLines}}{ A logical. If \code{FALSE}, the worksheet grid lines will be hidden.} \item{\strong{tabColour}}{ Colour of the worksheet tab. A valid colour (belonging to colours()) @@ -44,7 +44,7 @@ or a valid hex colour beginning with "#".} } \strong{writeData/writeDataTable Parameters} -\itemize{ +\describe{ \item{\strong{startCol}}{ A vector specifying the starting column(s) to write df} \item{\strong{startRow}}{ A vector specifying the starting row(s) to write df} \item{\strong{xy}}{ An alternative to specifying startCol and startRow individually. @@ -57,21 +57,21 @@ data. If "rows", a surrounding border is drawn a border around each row. If "co between each column. If "\code{all}" all cell borders are drawn.} \item{\strong{borderColour}}{ Colour of cell border} \item{\strong{borderStyle}}{ Border line style.} -\item{\strong{keepNA}} {If \code{TRUE}, NA values are converted to #N/A (or \code{na.string}, if not NULL) in Excel, else NA cells will be empty. Defaults to FALSE.} -\item{\strong{na.string}} {If not NULL, and if \code{keepNA} is \code{TRUE}, NA values are converted to this string in Excel. Defaults to NULL.} +\item{\strong{keepNA}}{If \code{TRUE}, NA values are converted to #N/A (or \code{na.string}, if not NULL) in Excel, else NA cells will be empty. Defaults to FALSE.} +\item{\strong{na.string}}{If not NULL, and if \code{keepNA} is \code{TRUE}, NA values are converted to this string in Excel. Defaults to NULL.} } \strong{freezePane Parameters} -\itemize{ -\item{\strong{firstActiveRow}} {Top row of active region to freeze pane.} -\item{\strong{firstActiveCol}} {Furthest left column of active region to freeze pane.} -\item{\strong{firstRow}} {If \code{TRUE}, freezes the first row (equivalent to firstActiveRow = 2)} -\item{\strong{firstCol}} {If \code{TRUE}, freezes the first column (equivalent to firstActiveCol = 2)} +\describe{ +\item{\strong{firstActiveRow}}{Top row of active region to freeze pane.} +\item{\strong{firstActiveCol}}{Furthest left column of active region to freeze pane.} +\item{\strong{firstRow}}{If \code{TRUE}, freezes the first row (equivalent to firstActiveRow = 2)} +\item{\strong{firstCol}}{If \code{TRUE}, freezes the first column (equivalent to firstActiveCol = 2)} } \strong{colWidths Parameters} -\itemize{ -\item{\strong{colWidths}} {May be a single value for all columns (or "auto"), or a list of vectors that will be recycled for each sheet (see examples)} +\describe{ +\item{\strong{colWidths}}{May be a single value for all columns (or "auto"), or a list of vectors that will be recycled for each sheet (see examples)} } } diff --git a/man/writeData.Rd b/man/writeData.Rd index 748165ac..be986f0d 100644 --- a/man/writeData.Rd +++ b/man/writeData.Rd @@ -57,10 +57,10 @@ a surrounding border is drawn with a border around each row. If "\code{columns}", a surrounding border is drawn with a border between each column. If "\code{all}" all cell borders are drawn.} -\item{borderColour}{Colour of cell border. A valid colour (belonging to \code{colours()} or a hex colour code, eg see \href{https://www.w3schools.com/web-design/color-picker/}{here}).} +\item{borderColour}{Colour of cell border. A valid colour (belonging to \code{colours()} or a hex colour code, eg see \href{https://www.w3schools.com/colors/colors_picker.asp}{here}).} \item{borderStyle}{Border line style -\itemize{ +\describe{ \item{\strong{none}}{ no border} \item{\strong{thin}}{ thin border} \item{\strong{medium}}{ medium border}