Learn R Programming

openxlsx2 (version 0.5.1)

wb_clone_worksheet: Clone a worksheet to a workbook

Description

Clone a worksheet to a Workbook object

Usage

wb_clone_worksheet(wb, old = current_sheet(), new = next_sheet())

Value

The wb object

Arguments

wb

A wbWorkbook object

old

Name of existing worksheet to copy

new

Name of New worksheet to create

See Also

Other workbook wrappers: wb_add_chartsheet(), wb_add_data_table(), wb_add_data(), wb_add_formula(), wb_add_pivot_table(), wb_add_worksheet(), wb_copy_cells(), wb_creators, wb_freeze_pane(), wb_get_base_font(), wb_save(), wb_set_col_widths(), wb_set_last_modified_by(), wb_set_row_heights(), wb_workbook(), workbook_grouping, ws_cell_merge

Examples

Run this code
# Create a new workbook
wb <- wb_workbook("Fred")

# Add worksheets
wb$add_worksheet("Sheet 1")
wb$clone_worksheet("Sheet 1", "Sheet 2")

Run the code above in your browser using DataLab