I am using RConnect to write to a workbook. The function is below I am getting the error message
Error: POIXMLException (Java): java.lang.reflect.InvocationTargetException
My research, [2] on the topic so far has said that this basically means the java machine doesn't have enough memory (i may be wrong)
This ran last week without any issues so I'm confused as to why it has suddenly become a problem with the file not having changed. It seems to bomb on Load workbook the template workbook
Basic Details
File size is 3MBs My computer has 16 Gigs of memory
Function
# Export it all to Excel
export_report <- function(mydf, startRow, Offset, myoutputTemplate, myoutput, mycomments) {
# Load workbook the template workbook
wb <- loadWorkbook(myoutputTemplate)
# write to the workbook the data frame
writeWorksheet(wb, mydf, sheet= "Analysis",
startRow=startRow, startCol=1, header=TRUE)
# write the analysis
writeWorksheet(wb, mycomments, sheet= "Analysis", header=FALSE,
startRow=startRow+Offset, startCol=1)
# Save the workbook
saveWorkbook(wb, myoutput)
}
I cant use open.xlsx because it requires RTools (i think) and my IT department is slow to install it.
I would take any alternatives anyone can suggest