if (FALSE) {
# Load workbook (create if not existing)
wb <- loadWorkbook("unmergeCells.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")
# Unmerge the cells A1:B8
unmergeCells(wb, sheet = "merge", reference = "A1:B8")
# clean up
file.remove("unmergeCells.xlsx")
}
Run the code above in your browser using DataLab