Closed CHaasSoil closed 1 year ago
Can you link to your test_file.xlsx
so that I can test the problem?
Can you link to your
test_file.xlsx
so that I can test the problem?
We have seen the same issue when using writexl 1.4.1. The following example would show the same error without importing any file:
library(writexl)
# create data with timestamp
check <- data.frame(
TestCol= rep("GV", 3),
Time = c(Sys.time(), NA, NA)
)
# write data
write_xlsx(
check,
"check.xlsx"
)
I think we already fixed this a while ago but it's not on CRAN yet. Can you try with writexl 1.4.2? You can install it from :
install.packages("writexl", repos = "https://ropensci.r-universe.dev")
I think we already fixed this a while ago but it's not on CRAN yet. Can you try with writexl 1.4.2? You can install it from :
install.packages("writexl", repos = "https://ropensci.r-universe.dev")
Hi jeroen,
Thanks for the reply. Yes, I don't see the issue anymore with writexl 1.4.2. Thanks for your help.
Writexl 1.4.2 is on cran now.
After reading (readxl) and writing (writexl) a xlsx file with R, an empty entry changes to "nan(snan)". See attachment: Change from before reading and writing
to after reading and writing
I and another stackoverflow user haven't had this problem before we updated to writexl 1.4.1. Any ideas? writexl1.4 solves the problem.
Example Code:
require(writexl)
require(readxl)
data<-read_excel("test_file.xlsx")
data$ERF_DATUM[3]<-NA
write_xlsx(data, "test_file.xlsx", col_names = TRUE, format_headers = TRUE)
Best greetings Christoph