Reputation: 1040
I'm learning openxlsx in R. I have no problem creating a workbook, adding a worksheet or saving a workbook until I try to save the 4th worksheet I created. Does anyone know if there is a limit on the number of worksheets that can be saved to a workbook created in R using openxlsx? When I try to save the workbook after writing data for the 4th sheet I get this error message: Error in comment_list[[i]] : subscript out of bounds.
Thanks
Upvotes: 1
Views: 1703
Reputation: 11
There is no limit in number of worksheets to any .xlsx
Example:
library(openxlsx)
iris
wb <- createWorkbook()
for (i in 1:8) {
addWorksheet(wb,i)
writeDataTable(wb,i,iris)
}
saveWorkbook(wb, 'Exports/prueba.xlsx', overwrite = T)
Upvotes: 1