Skip to content

Commit

Permalink
fix wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Oct 2, 2023
1 parent c69a438 commit 5a721ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/class-workbook-wrappers.R
Expand Up @@ -737,6 +737,7 @@ wb_add_worksheet <- function(
#' @param wb A `wbWorkbook` object
#' @param old Name of existing worksheet to copy
#' @param new Name of the new worksheet to create
#' @param from (optional) Workbook to clone old from
#' @return The `wbWorkbook` object, invisibly.
#'
#' @export
Expand All @@ -751,9 +752,9 @@ wb_add_worksheet <- function(
#' wb$clone_worksheet("Sheet 1", new = "Sheet 2")
#' # Take advantage of waiver functions
#' wb$clone_worksheet(old = "Sheet 1")
wb_clone_worksheet <- function(wb, old = current_sheet(), new = next_sheet()) {
wb_clone_worksheet <- function(wb, old = current_sheet(), new = next_sheet(), from = NULL) {
assert_workbook(wb)
wb$clone()$clone_worksheet(old = old, new = new)
wb$clone()$clone_worksheet(old = old, new = new, from = from)
}

# worksheets --------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion man/wb_clone_worksheet.Rd

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

0 comments on commit 5a721ba

Please sign in to comment.