Copying worksheet with modified chart is changing the charts format


#1

I have a worksheet with a chart whhere specific components of the chart have been modified such as colors and text format of labels.

When I run the following code, the copied sheet shows slightly different colors and some of the text label formats are lost.

    static void Main(string[] args)
    {
        Workbook source = new Workbook(args[0]);
        Workbook target = new Workbook(args[1]);

        foreach (Worksheet ws in source.Worksheets)
        {
            Worksheet newWs = target.Worksheets.Add("myNewSheet_" + ws.Name);
            newWs.Copy(ws);
        }

        target.Save(target.AbsolutePath + "Copy_" + target.FileName);
    }

#2

@mhopkins,

Thanks for the code segment and details.

Could you provide your template files (input file(s) and output file(s)), we will check it soon.