Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocumentFormat.OpenXml.Office2016.Drawing.Charts.UniqueID creates the wrong case in the resulting XML #1766

Open
skrabbe001 opened this issue Jul 31, 2024 · 0 comments
Assignees

Comments

@skrabbe001
Copy link

skrabbe001 commented Jul 31, 2024

DocumentFormat.OpenXml.Office2016.Drawing.Charts.UniqueID creates the wrong case in the resulting XML.

The case created by the SDK is "UniqueID" but it should be "UniqueId", otherwise the PowerPoint application (in some instances) reports an error when saving the presentation after opening it:

PowerPoint couldn't read some content in test.pptx and removed it.
Please check your presentation to see if the rest of it looks ok.

When creating unique identifiers for a chart series, then the following code creates a corrupted presentation:

using C16 = DocumentFormat.OpenXml.Office2016.Drawing.Charts;

var uniqueId = new C16.UniqueID() { Val = $"{{{seriesGuid}}}" };
ext.Append(uniqueId);

This is a workaround for the time being:

ext.InnerXml = $"<c16:uniqueId xmlns:c16=\"http://schemas.microsoft.com/office/drawing/2014/chart\" val=\"{{{seriesGuid}}}\" />";

Library Version: 3.0.1

PowerPoint Version: Microsoft® PowerPoint® for Microsoft 365 MSO (Version 2405 Build 16.0.17628.20006) 64-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants