deleteData doesn't delete styles even though help function says so
Using ?deleteData says "Delete contents and styling from a cell."
However, this doesn't seem to be the case:
wb <- createWorkbook()
addWorksheet(wb, "Iris")
writeData(wb, "Iris", iris)
my_style <- createStyle(bgFill = "#252525")
addStyle(wb, "Iris", my_style, cols = 1, rows = 1:dim(iris)[1],gridExpand = TRUE)
saveWorkbook(wb, file = "test.xlsx", overwrite = TRUE)
Opening this Excel file shows that column 1 is entirely black.
deleteData(wb, sheet = "Iris", cols = 1, rows = 2:5, gridExpand = TRUE)
saveWorkbook(wb, file = "test.xlsx", overwrite = TRUE)
This is supposed to delete the data and background color/styles from first column, row 2:5. And while the data is indeed deleted, the styling is not.
I can confirm this issue using the code provided, and I've also noticed this in some of my own code as well.
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.