I believe I’ve fixed the issue by adding the code listed below at the end of CopyChartObjects function in the OpenXmlPowerTools PresentationBuilder.cs:
private static void CopyChartObjects(ChartPart oldChart, ChartPart newChart)
{
……………………………………………………………..
foreach (var oldTop in oldChart.Parts.Where(p => p.OpenXmlPart.ContentType == “application/vnd.openxmlformats-officedocument.themeOverride+xml”))
{
var newId = “R” + Guid.NewGuid().ToString().Replace(“-“, “”).Substring(0, 16);
ThemeOverridePart newTop = newChart.AddNewPart<ThemeOverridePart>(“application/vnd.openxmlformats-officedocument.themeOverride+xml”, newId);
newTop.FeedData(oldTop.OpenXmlPart.GetStream());
newChart.CreateRelationshipToPart(newTop, newId);
}
}
It works for me, but please correct me if I’m doing something wrong.
Thanks!