ycphs / openxlsx

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

XLSM File becomes corrupted after opening it twice and copying sheets with hyperlinks without using excel #434

Closed NieznanyImANinja closed 3 weeks ago

NieznanyImANinja commented 1 year ago

https://github.com/awalker89/openxlsx/issues/22#issuecomment-1584693234

Describe the bug XLSM file becomes corrupted and is not retrievable after opening it twice with openxlsx and copying sheet with hyperlink twice.

To Reproduce

  1. Load XLSM file with loadWorkbook
  2. Copy a sheet with hyperlink (sheet2)
  3. Save XLSM file
  4. Load freshly saved XLSM file
  5. Copy sheet2
  6. Save XLSM file
  7. Try to open XLSM file

Screenshots https://imgur.com/a/dJZoS4k

Example files AUT.zip openxlsxbug.zip

Additional context It seems that there are new xml.rels created every time openxlsx loads files. Deleting new xml.rels allowed me to load XLSM without corrupting the file on save.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been stalled for 7 days with no activity.