Aspose.Cells.Worksheet - Chart formatting is changed on worksheet copy

Hi, I am using Aspose.Cells for .Net (version 23.11.0) and facing an issue with Aspose.Cells.Worksheet. It seems that when I copy the worksheet to a new workbook using the worksheet’s Copy method, the formatting of the chart within the sheet is changed. Please see the QCompare sheet in the attached workbooks. In the copied sheet (TestChartResult):

  1. The background is black instead of white.
  2. One of the dots in the line became a triangle / arrow instead of a circle
  3. One of the line’s segments was blue before and it’s black now.

The code snippet used is as follows:

Workbook wb = new Workbook();
            foreach (Worksheet sheet in workbook.Worksheets)
            {
                Worksheet ws = wb.Worksheets.Add(sheet.Name);
                ws.Copy(sheet);
            }

Could you please share why this happens and provide a resolution/workaround? Thank you!
TestFiles.zip (2.3 MB)

@AvneetK,

After an initial test, we reproduced the issue you mentioned by using the following sample code with your template Excel file. We found chart formatting is changed on worksheet copy in the output Excel file.

Workbook workbook = new Workbook("g:\\test2\\TestChart.xlsx");
Workbook wb = new Workbook();
foreach (Worksheet sheet in workbook.Worksheets)
{
        Worksheet ws = wb.Worksheets.Add(sheet.Name);
        ws.Copy(sheet);
}
wb.Save("g:\\test2\\out1.xlsx");

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55543

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

@AvneetK,

This is to inform you that we have resolved your issue (“CELLSNET-55543”). The fix will be included in our upcoming release (Aspose.Cells v24.5) that we plan to release in the second week of May 2024. You will be notified when the next version is released.

The issues you have found earlier (filed as CELLSNET-55543) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

1 Like