I am using xlsx package to create workbook, worksheet, write data to the sheet and then save the workbook. However, when I repeat this set of actions for several times, I start
I do not know how to do it on xlsx, in fact I no longer use it because of those issues
I now use XLConnect, and it has a command
xlcFreeMemory()
to do just that
Please note that for best results you need to increase Java memory before youload it as follows
options( java.parameters = "-Xmx4g" )
library(XLConnect)
Good luck