ycphs/openxlsx

Issue with the package openxlsx

RaquelMartos opened this issue · 2 comments

I'm trying to overwrite an existing sheet in a previously created excel file (not from R). When using the following functions I get an error when I try to open the excel.

path <- "Y:\SOURCE DATA\TradeMonitors\FALC\FALC 2.0\USFALC2018toPresent.xlsx"
wb = openxlsx::loadWorkbook(path)
openxlsx::removeWorksheet(wb, "Importers")
openxlsx::addWorksheet(wb, "Importers")
openxlsx::writeData(wb, "Importers", ImportersUSFALC)
openxlsx::saveWorkbook(wb, path, overwrite = TRUE)

When I try to open the excel file it puts me that the file is corrupted and there is part of the data that cannot be recovered. What could be the problem?

Thank you in advance.

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue was closed because it has been stalled for 7 days with no activity.