ycphs / openxlsx

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

Properly closing </sheetPr> when writing `xl/worksheets/sheet*.xml` #404

Closed retostauffer closed 1 year ago

retostauffer commented 1 year ago

Dear dev team,

writing issue #403 seems to have sorted my thoughts and I was able to track down the problem (what I think the problem is). This pull request fixes the problem with the minimal (see #403) and does not break the tests.

Thanks for all your work and all best, R

JanMarvin commented 1 year ago

Hi @retostauffer , I fear that the pull request is based on an incorrect assumption. The duplicated sheetPr tag needs to be removed, not closed. Otherwise Excel will not be able to open the file. At least that's what I do in openxlsx2 and that's tested with Excel.