Chart xls/xlsx


does it exist some progress by the chart support in the FlexCel component?

I have tried the version 6.10 but cannot modify the series in the chart. Some forum topics said that it is possible with xls format but in my case the xls format does not work at all.

For example the code (The second sheet is the CHART sheet)

            xls.ActiveSheet = 2;
            int a = xls.ObjectCount; //=1

                FlexCel.Core.ExcelChart chart1 = xls.GetChart(1, String.Empty);
                FlexCel.Core.ChartSeries seria = new ChartSeries();

 for xls format just throw the exception {"Invalid value for parameter "ObjectIndex": 1 There are no elements in the list."} but for the xlsx it shows 0 series.


Chart objects (those embedded inside a sheet) and chart sheets are different things, and even if both are supported, you need to access them by different ways.

For chart sheets you need to use ChartCount, and for chart objects you need ObjectCount. You can find an example here (ProcessCharts) that uses both:

Here you can see an example of adding series to existing charts in both embedded objects or chart sheets:

As you can see, the main issue with AddSeries is that you can't control the format of the new series, and in xls files they default to "old style" colors and shadings. So it is normally better if possible to add the maximum number of series in the template, and format them with Excel, and then use DeleteSeries to remove the unwanted ones. You can also use SetSeries to change the existing series.

About xlsx support and AddChart, it is being worked on and there have been advances, but they are in a not public branch at the moment. Sadly there is still a lot of work to do yet and there is of course all the ongoing work supporting existing features, so even when we would personally like to have it yesterday, it is still some months away.

Thank you for the answer. I will check the solution, seems that it can help us.