OpenXmlPackage.SaveAs() corrupts file names
See original GitHub issueDescribe the bug
OpenXmlPackage.SaveAs()
corrupts names of the internal package files.
To Reproduce Steps to reproduce the behavior:
using var pres = PresentationDocument.Open("base.pptx", true);
var savedAs = pres.SaveAs("modified.pptx");
savedAs.Close();
Observed behavior The following renaming happened:
/ppt/slides/slide1.xml -> /ppt/slides/slide12.xml /ppt/slides/slide2.xml -> /ppt/slides/slide21.xml
Expected behavior The original names of /ppt/slides/slide1.xml and slide2.xml should not be changed.
Desktop:
- OS: Windows 10
- .NET Target: .NET 6
- DocumentFormat.OpenXml Version: 2.17.1
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
OpenXmlPackage.SaveAs() corrupts file names #1197
Describe the bug OpenXmlPackage.SaveAs() corrupts names of the internal package files. To Reproduce Steps to reproduce the behavior: ...
Read more >c# - OpenXml SpreadsheetDocument SaveAs() produces ...
This dead-simple code creates a file that Excel won't open. How could this be failing? using (SpreadsheetDocument doc = SpreadsheetDocument.Open ...
Read more >File getting corrupted while adding comments to excel ...
Hello, Below link provided me the working code to add comments to an excel using Open Xml. This worked perfect for the excel...
Read more >VBA saveas causing corruption
Hi Looking at the code, it seems to be trying to open the file that is referenced in cell B15, and then saving...
Read more >How to diagnose Excel file corruption and repair workbooks
During workbook save, Office will detect, if image relationships in the customUI XML part have been corrupted inside an OpenXML file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@adamshakhabov Thank you very much for the information. I am able to repro the issue your described using 2.17.1. I will take the issue back to our engineering team, and we will let you know the resolution.
Hi Adamshakhabov
We traced the issue back, where appending extra sequence number was introduced with Openxml SDK 2.9, and the issue does not repro with 2.8.1 and prior. It impacted not only PowerPoint, but other Office apps as well. No ETA, yet.