EPPLus – Copy worksheet that contains chart throws Type is a duplicate attribute error


This Content is from Stack Overflow. Question asked by Arvind S

I am trying to copy a worksheet from one workbook to another.
For normal worksheets, my code

excelPackage.Workbook.Worksheets.Add("Target", origWS);

works fine. But when the same code is used for a worksheet that contains charts, I get an error

 ''type'' is a duplicate attribute Line 9, Col 150

This seems to be an issue in the XML structure of the excel file

Any help would be much appreciated.


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?