Native chart color palette is not preserved

Hi,

Here I’m opening a workbook with a chart that have a color palette applied (see image inputColorPalette.png in the attached zip file). When adding values to the chart (see attached Visual Studio project) and saving the workbook, chart seems to have lost the applied color palette (see outputColorPalette.png)

Best regards

AsposeCellsNativeChartColors.zip (71.9 KB)

@andreagasparin,
I have tried to reproduce this issue here but could not observe the view shared in your images. Could you please share which MS Excel are you using and share exact steps to observe this problem?

Hi,

This is the Excel version I am using
image.png (1.1 KB)

When opening the input.xlsx file (you can find it in the attached zip) you can follow these steps:

  • select the chart in the first sheet
  • go under “Chart Design” in the ribbon
  • open the “Change colors” menu: here you can see that the second option is select
    image.png (23.1 KB)

If you do the same with output.xlsx you can see that no color scheme is selected

@andreagasparin,
This issue is reproduced and logged in our database for further investigation. You will be notified once any update is ready for sharing.

This issue is logged as:
CELLSNET-47838 - Native chart color palette is not preserved

@andreagasparin,

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@andreagasparin
Please try the latest fix 21.1.4.
Aspose.Cells21.1.4 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.1.4 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.1.4 For .NetStandard20.Zip (5.5 MB)

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

Hi,

We have reproduced the same issue using a similar input with version 21.2, please check the attached project

AsposeCellsNativeChartColors2.zip (214.6 KB)

@andreagasparin,
We have observed the issue and logged it with the ticket for further investigation.

@andreagasparin,
Please try the latest fix 21.2.2. Your issue should be resolved with it.
Aspose.Cells21.2.2 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.2.2 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.2.2 For .NetStandard20.Zip (5.5 MB)

Hi all,

Unfortunately this issue is still present when saving xlsx file to stream and opening it as a Workbook again. I’ve replicated in the attached sample project. The code is basically this:

var wb = new Workbook(inputFileName); // original file, chart with a color pallette 

wb.Save(path + "openedAndSaved_noissue.xlsx", SaveFormat.Xlsx); // here chart still have color palette applied

// save workbook to stream and read from stream
using (var refreshStream = new MemoryStream())
{
     wb.Save(refreshStream, SaveFormat.Xlsx);
     refreshStream.Position = 0;
     var resultWorkbook = new Workbook(refreshStream);
     resultWorkbook.Save(path + "savedToStream_issue.xlsx", SaveFormat.Xlsx); // here there is no more color palette 
}

AsposeCellsNativeChartColors_2.zip (242.4 KB)

@andreagasparin,

You are right. The issue is reproduced again using your new file with your sample code. I have reopened your issue “CELLSNET-47838”. We will look into it soon.

Once we have an update on it, we will let you know here.

@andreagasparin,

This is to inform you that we have fixed the issue precisely now. We will publish the fix in the next few days after performing QA and incorporating other enhancements and fixes.

@andreagasparin
Please try the latest fix 21.3.5.
Aspose.Cells21.3.5 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.3.5 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.3.5 For .NetStandard20.Zip (5.5 MB)

Hi,

Thanks for the news, does the new 21.4 version includes this fix?

@andreagasparin,

Yes, the latest version (Aspose.Cells for .NET 21.4) includes the fix.

Let us know if you still find any issue with Aspose.Cells for .NET 21.4.