- Pass a formula to an xls file using R's xlsx package
- library(xlsx)
- wb <- loadWorkbook('D:/test.xls')
- sheets <- getSheets(wb)
- sheet <- sheets[['my_sheet']]
- addDataFrame(x = ds, sheet = sheet, row.names = FALSE, col.names = FALSE, startRow=3, startColumn=1)
- cell.1 <- createCell(rows[1], colIndex=34)[[1,1]]
- setCellValue(cell.1, "=A32*B33")
- saveWorkbook(wb, 'D:/test.xls')