
Last chance! 50% off unlimited learning
Sale ends in
Merges cells in a worksheet.
# S4 method for workbook,character
mergeCells(object,sheet,reference)
# S4 method for workbook,numeric
mergeCells(object,sheet,reference)
The workbook
to use
The name or index of the sheet on which to merge cells
A cell range specification (character
) in the form 'A1:B8'
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
workbook
, unmergeCells
,
idx2cref
if (FALSE) {
# Load workbook (create if not existing)
wb <- loadWorkbook("mergeCells.xlsx", create = TRUE)
# Create a worksheet called 'merge'
createSheet(wb, name = "merge")
# Merge the cells A1:B8 on the worksheet created above
mergeCells(wb, sheet = "merge", reference = "A1:B8")
# Save workbook
saveWorkbook(wb)
# clean up
file.remove("mergeCells.xlsx")
}
Run the code above in your browser using DataLab