ropensci / writexl

Portable, light-weight data frame to xlsx exporter for R
https://docs.ropensci.org/writexl
Other
210 stars 17 forks source link

writexl::write_xlsx incompatibility with openxlsx #62

Closed erosix closed 2 years ago

erosix commented 2 years ago

Hello, I have some compatibility problems between openxlsx and readxl/writexl. I read some excel sheets with 20+ alpha/numeric columns, by doing: readxl::read_xlsx(myfile)

I manipulated the excel and then saved it with: writexl::write_xlsx(myfile_edited)

This file has then been read by a pipeline which utilizes: openxlsx::read.xlsx(myfile_edited) when this is done, the file is not read correctly and only some columns are displayed. In detail only numeric columns are displayed.

However, if I do: readxl::read_xlsx(myfile_edited) this works correctly.

Similarly, If I do the contrary, i.e. openxlsx::read.xlsx(myfile) openxlsx::write.xlsx(myfile_edited) readxl::read_xlsx(myfile_edited)

everything works fine. Which makes me think that the problematic point may be the writexl::write_xlsx(myfile_edited) (?) Any idea?

jmcnamara commented 2 years ago

Which makes me think that the problematic point may be the writexl::write_xlsx(myfile_edited) (?)

That seems logical. On the other hand the libxlsxwriter library used by writxl is designed (and tested) to have a very high degree of fidelity with files produced by Excel, specifically in order to avoid compatibility issues.

Could you create a small complete R program that demonstrates the issue (and with the read/write/read sequence described above) and I will have a look at it.

jmcnamara commented 2 years ago

@erosix any update on this?

jmcnamara commented 2 years ago

@jeroen could you close this issue since there is no reproducible example.