I have created an Excel file using the xlsx package in R. When I go to open the file I get an error message:
Excel found unreadable content in this workbook.
Do you want to recover the contents of this workbook?
I select yes and it doesn't appear like anything is missing. Does anyone know why this is happening? I found another stackoverflow question about this same issue but for a different program
Error Message after creating XLSX file using java
My R and OS information is below.
R version 3.2.1 (2015-06-18) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
The code I have been using for the Excel file is:
#create excel workbook for output data
surveyresults_2015v4<-createWorkbook( )
#export catch data to output file
c_data<- createSheet(wb=surveyresults_2015v4, sheetName="catch_data")
addDataFrame(x=datag, sheet=c_data,row.names=FALSE,showNA=F )
saveWorkbook(surveyresults_2015v4, "surveyresults_2015v4.xlsx")