I'm currently using xlsx package to create and modify Excel files but I need to get rid of Java dependency. I've tried swapping the xlsx package for the openxlsx package but I can't find any simple way to replace addDataFrame function. My code looks like this:
wb = createWorkbook()
sheet = createSheet(wb, "Sheet Name")
addDataFrame(data.frame(MyFile, check.names=FALSE), sheet=sheet, startColumn=1, row.names=FALSE)
saveWorkbook(wb, "MyWB.xlsx")
Is there any function in openxlsx which I can use to add a dataframe to the sheet? Or in any other library which doesn't depend on Java?
We use the
writeData
to add the data frame to a worksheet. For example