ycphs / openxlsx

openxlsx - a fast way to read and write complex xslx files
https://ycphs.github.io/openxlsx/
Other
220 stars 74 forks source link

Issue with the package openxlsx #424

Closed RaquelMartos closed 4 months ago

RaquelMartos commented 1 year ago

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.

github-actions[bot] commented 4 months ago

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.

github-actions[bot] commented 4 months ago

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