Free Support Forum - aspose.com

Saved file always showing legend keys in charts even hiding the legend in .NET

Hi,

File saved with Aspose.Cells then opened in Excel it’s always showing legend keys in chart even if ChartDataTable.ShowLegendKey is set to false.
For reproducing the issue please use the attached xlsx file, run the following code and then open the resulted file (“output.xlsx”) in Excel.

var workbook = new Workbook(“Data_Table.xlsx”);

Console.WriteLine(“Chart.DataTable.ShowLegendKey: {0}”, workbook.Worksheets[0].Charts[0].ChartDataTable.ShowLegendKey);

workbook.Worksheets[0].Charts[0].ChartDataTable.ShowLegendKey = false;

Console.WriteLine(“Chart.DataTable.ShowLegendKey: {0}”, workbook.Worksheets[0].Charts[0].ChartDataTable.ShowLegendKey);

workbook.Save(“output.xlsx”);



InternalID: 31410

Best regards,
Aurelian Iordache
Software Developer
IBM Romania

Hi,


I have evaluated your scenario/ case using your template file and sample code.

I did notice the issue when opening the file into MS Excel 2010 or greater versions as when I opened the output file into MS Excel 2007, it works fine and as expected. Ms Excel 2007 does not show legend keys in chart’s data table. Could you confirm the issue only for Excel 2010/2013? We may log a ticket for it soon.

Thank you.


Hi Amjad,

I just opened the file on a vm with Windows 7 Enterprise SP1 and MS Excel 2007 SP3, I confirm the issue is not present.
So it seems this is reproducing only on Excel 2010 and greater versions.
For convenience I’m attaching a screenshot here.

Regards,
Aurelian Iordache
Software Developer
IBM Romania

Hi,


Thanks for the confirmation.

As I already observed the issue (after using your template file and sample code) in MS Excel 2010 or greater versions (it works fine in Ms Excel 2007 though). I found the saved file is always showing legend keys in the charts even if Chart.ChartDataTable.ShowLegendKey is set to “false” as you mentioned. I have logged a ticket with an id “CELLSNET-43936” for your issue. We will look into it soon.

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

Thank you.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.6.0.5 and let us know your feedback.

Hi Shakeel,

I just downloaded and tested with v.8.6.0.5, I confirm the issue is fixed.
For reference I’m attaching a screenshot with the result here.

Thank you,
Aurelian Iordache
Software Developer
IBM Romania

Hi,


Thanks for your feedback.

Good to know that your issue is resolved by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-43936) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.