Skip to content

Commit

Permalink
resolves #249
Browse files Browse the repository at this point in the history
changes seems to be unintentional
  • Loading branch information
jmbarbone committed Sep 4, 2021
1 parent 42cc362 commit 5c224e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* add option to save as read only recommended ([#201](https://github.com/ychps/openxlsx/issues/201))
* fixed writing hyperlink formulas ([#200](https://github.com/ychps/openxlsx/issues/200))
* `write.xlsx()` now throws an error if it doesn't have write permissions ([#190](https://github.com/ycphs/openxlsx/issues/190))
* `write.xlsx()` now again uses the default of `overwrite = TRUE` for saving files ([#249](https://github.com/ycphs/openxlsx/issues/249))

# openxlsx 4.2.4

Expand Down
6 changes: 4 additions & 2 deletions R/writexlsx.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#' @author Alexander Walker, Jordan Mark Barbone
#' @inheritParams buildWorkbook
#' @param file A file path to save the xlsx file
#' @param overwrite If `TRUE` will save over `file` if present (default: `FALSE`)
#' @param overwrite If \code{FALSE} will not save over \code{file} if present (default: \code{TRUE})
#' @param ... Additional arguments passed to \code{\link{buildWorkbook}}
#'
#'
#' \itemize{
#' \item{createWorkbook}
Expand Down Expand Up @@ -121,7 +123,7 @@
#' }
#'
#' @export
write.xlsx <- function(x, file, asTable = FALSE, overwrite = FALSE, ...) {
write.xlsx <- function(x, file, asTable = FALSE, overwrite = TRUE, ...) {
wb <- buildWorkbook(x, asTable = asTable, ...)
saveWorkbook(wb, file = file, overwrite = overwrite)
invisible(wb)
Expand Down
10 changes: 5 additions & 5 deletions man/write.xlsx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c224e7

Please sign in to comment.