R: Hide worksheet with xlsx package
I have had great success with the xlsx R package for many things. However, the documentation says that "the user has the ability to set colors, fonts, data formats, add borders, hide / hide sheets , add / remove lines, add / remove sheets, etc.". (My emphasis.)
However, I have looked through the documentation and cannot find a function to hide the sheets. Can anyone point me to this? Thank!
Documentation at http://cran.r-project.org/web/packages/xlsx/xlsx.pdf if that helps.
source to share
So that others having the same issue may find the answer, here's how developer Adrian Dragulescu responded to my email address:
Once you have a workbook
wb <- createWorkbook()
You can do
wb$setSheetHidden(0L, 1L)
if you want to hide the first sheet (0 based indexing in Java). See the documentation here: http://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFWorkbook.html#setSheetHidden(int , int)
I can confirm this, and many thanks to Mr. Dragulescu.
source to share