Write.xlsx error

Dear,

here is my code:
sheetData <- dcast(testData, smp+Serial+Temp~Master+VDD, value.var="Speed", fun=length)
write.xlsx(sheetData, sheetName="Test Counts",path="summary.xlsx", row.names = FALSE, append=FALSE)

i am getting below error:
Error in write.xlsx(sheetData, sheetName = "Test Counts", path = "summary.xlsx", :
could not find function "write.xlsx"

I have tried all the posible way like install all the package(writexl, readxl, update java). But still not resolving this issue. Can you please suggest me the way?

I think write.xlsx() function comes from the openxlsx package, so you have to install and load the library before using the function.

install.packages('openxlsx') # Install just once
library(openxlsx) # Load on each new session
4 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.