JanMarvin / openxlsx2

openxlsx2 - read, write and modify xlsx files
https://janmarvin.github.io/openxlsx2/
Other
117 stars 10 forks source link

pageSetup causes issues #216

Closed JanMarvin closed 2 years ago

JanMarvin commented 2 years ago

To reproduce. Seeing the issue with Windows 10 and Excel 16. Not sure when or why it happens

wb_workbook()$add_worksheet("cars")$add_data("cars", cars)$open()
JanMarvin commented 2 years ago

Or better, I know why it happens. rid 2 is vmldrawing and not pageSetup, though unsure why it isn't reporting on Mac ms365. And what precisely pageSetup expects. Maybe the printer setup binary file I removed. Can pageSetup be removed entirely? So many questions

JanMarvin commented 2 years ago

looks like removing rId fixes the issue. in default worksheet _rels and in pageSetup. I'll add a pull request

JanMarvin commented 2 years ago

https://github.com/JanMarvin/openxlsx2/blob/bba1ec3c4c4bf90a7c94178220857a10c98814c4/R/class-workbook.R#L3542

https://github.com/JanMarvin/openxlsx2/blob/587b96ee53613bc4532fa24d9aab373e03db02a6/R/class-worksheet.R#L212

https://github.com/JanMarvin/openxlsx2/blob/f9959be2d9d6953763373ecd7ace79725e6220e7/tests/testthat/test-helper_functions.R#L62