I would like to hide a row in a dataframe that I am writing to Excel using the xlsx package, but can't find a way to do this.
xlsx has the option of
SheetName$setColumnHidden(index, TRUE)
is there no equivalent to hide a single row?
I tried SheetName$setRowGroupCollapsed(rownumber, TRUE), but this hid all rows in the dataframe when saving to Excel
example:
notice how there are row names to the left of col1?
you can do:
or:
then you do:
then
write.xlsx(data, "abc.xlsx", sheetname = "poop")