Unable to see your code and know exactly what you are trying to do, I suggest trying
setCellValue(cell, value)
For example, starting from scratch and creating a new excel file:
wb <- createWorkbook(type="xlsx")
sheet <- createSheet(wb, sheetName="Sheet1")
rows <- createRow(sheet, rowIndex=1:10)
cells <- createCell(rows, colIndex=1:6)
setCellValue(cells[[1,2]], "Data Frame Title Goes Here")
source
share