A warning message appears:
Warning message: No data found on worksheet.
Reason:
I believe xlsx-files that were written previously with the write_xlsx from with writexl-package cannot be read. Something in the formatting may be wrong. So, this may be actually be a problem on the writexl-package but not only ...
Can this be fixed? So, that read.xlsx handles the putatively wrong formatting of xlsx files written with write_xlsx?
Solution, even though not satisfying:
Open the xlsx file with excel first and save again. Then read.xlsx can read it.
Steps to Reproduce the Problem
Save data to a xlsx file with writexl::write_xlsx.
Try to read it with openxlsx::read.xlsx.
Get an error.
Repair it by opening with excel. Alternatively though, it would be great if read.xlsx could handle it.
Expected Behavior
Reading an excel file with data on it into R.
Actual Behavior
A warning message appears: Warning message: No data found on worksheet.
Reason:
I believe xlsx-files that were written previously with the write_xlsx from with writexl-package cannot be read. Something in the formatting may be wrong. So, this may be actually be a problem on the writexl-package but not only ... Can this be fixed? So, that read.xlsx handles the putatively wrong formatting of xlsx files written with write_xlsx?
Solution, even though not satisfying:
Open the xlsx file with excel first and save again. Then read.xlsx can read it.
Steps to Reproduce the Problem
Save data to a xlsx file with writexl::write_xlsx.
Try to read it with openxlsx::read.xlsx.
Get an error.
Repair it by opening with excel. Alternatively though, it would be great if read.xlsx could handle it.
sessionInfo()
example-file for reproduction: example.xlsx