ycphs / openxlsx

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

XML in `drawingX.xml` might be broken #260

Closed JanMarvin closed 3 years ago

JanMarvin commented 3 years ago

https://github.com/ycphs/openxlsx/blob/fe7bd5be4153903e84c88eae98dc6cc5a0b786a9/R/loadWorkbook.R#L745

We might need something like the following, because here https://github.com/ycphs/openxlsx/blob/fe7bd5be4153903e84c88eae98dc6cc5a0b786a9/R/loadWorkbook.R#L718-L720 we remove the outer tags and we never reapply them. This leads to broken drawingX.xml files.

wb$drawings[i] <- sprintf("<xdr:wsDr xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">%s</xdr:wsDr>", dXML[drawingInd])

Iirc correctly, that was the main issue with #81 (yeah, I took the long road fixing that).

JanMarvin commented 3 years ago

ah nope, its to late for issues :yawning_face: