question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The error is occurring while merging the two OpenXML word documents having the chart into one of the document.

See original GitHub issue

Description

The error is occurring while merging the two OpenXML word documents having the Chart inside one of the document.

Below is the error. “Unable to cast object of type ‘DocumentFormat.OpenXml.Packaging.ExtendedPart’ to type ‘DocumentFormat.OpenXml.Packaging.EmbeddedPackagePart’.”

Below is the Stack track. The error is occurring from “OpenXmlPowerTools.DocumentBuilder.CopyChartObjects” at OpenXmlPowerTools.DocumentBuilder.CopyChartObjects(ChartPart oldChart, ChartPart newChart) at OpenXmlPowerTools.DocumentBuilder.CopyRelatedPartsForContentParts(OpenXmlPart oldContentPart, OpenXmlPart newContentPart, IEnumerable1 newContent, List1 images) at OpenXmlPowerTools.DocumentBuilder.AppendDocument(WordprocessingDocument sourceDocument, WordprocessingDocument newDocument, List1 newContent, Boolean keepSection, String insertId, List1 images) at OpenXmlPowerTools.DocumentBuilder.BuildDocument(List1 sources, WordprocessingDocument output) at OpenXmlPowerTools.DocumentBuilder.BuildDocument(List1 sources)

Information

  • .NET Target: (.NET Framework 4.6.1)
  • DocumentFormat.OpenXml Version: (2.11.3.0 as well as 2.13.0.0)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sorensenmatiascommented, Jun 11, 2021

This is using OpenXmlPowerTools - I think you should direct your attention to that library and not this one? Am I missing something?

0reactions
twsouthwickcommented, Jul 23, 2021

Since this is not directly related to the SDK, I’m going to close this. Please re-open if I have misunderstood.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The error is occurring while merging the two OpenXML ...
The error is occurring while merging the two OpenXML word documents having the chart into one of the document. #941.
Read more >
c# / openxml merge of word documents to one, fails --closed
Fixed it. It seems word cannot merge different Formats in one Document. So if you have 2 documents with a footer and other...
Read more >
Understand when and how to use Office Open XML in your ...
Overview of when and how to use Office Open XML in your Word add-in.
Read more >
[Solved] Word Experienced Errors when Trying to Open the ...
Unable to load a DOC file and getting the Word experienced errors when trying to open the file prompt? Check this guide to...
Read more >
Create a template document for OpenXML Word report
In the tree view, expand Document Category > Template Documents. Expand the Template Documents node. Right-click Word OpenXML Template, and click New ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found