I am trying to export my TCharts to excel using Flexcel - mostly this is working OK but I have some issues that I cannot seem to resolve (I can work around some). The basic problem is that for some objects/interfaces I am able to read values and then change those value, but the new values are not reflected in the xls file...
Hi,
Sadly modifying charts with the API is not fully supported yet. It is something that we are working on, but yes, many properties don't provide a way to modify them back.
For a little more of history, the work in the chart object model was done about the 4.0 FlexCel times, and it started with reading xls charts (this part is finished and it is what the redering engine uses to render the charts). But when we were about to start the writing part, Microsoft release xlsx and all priorities changed. Since then we have been steadily adding xlsx features (and a lot of other stuff too) until today, when virtually the only important thing missing is a way to add charts with the API, to modify them, and to export xlsx charts to pdf. So this is what we are working on right now, and I hope it won't take too long until we have a better API for modifying/adding charts. (with APIMate telling you how to do it too of course).
And going a little more in detail of the missing methods, FlexCel works differently from OLE in that most objects are loosely coupled and don't know about their parents. So if you get a range of cells, this range doesn't know anything about the workbook it is in, and if you modify it, you won't modify the workbooks as you would in OLE Automation with some code like range.value = 7.
So in FlexCel the pattern is:
something := xls.GetSomething;
Modify(something); //This modifies something, but not xls or the chart.
xls.SetSomething(something);
We do have some methods in charts like GetSeries/SetSeries but others like ChartOptions don't have a way to "Set" them.
So you can get the chart options, you can modify them, but until we provide a "SetChartOptions" or a ChartOptions := options; you can't put those values back in the chart.
As said, we are working in adding those missing "set" methods so the API is completed, but right now we only have some basic ones like SetSeries. A lot of others still need to be implemented and that's what we are doing right now (that and of course also fixing stuff. fixing stuff has the higher priority, so that's why progress adding the new methods is slower than I would like it to be)
Thanks Adrian,
Hi Adrian
Hi,
Sadly there is still no a chart rendering engine for xlsx files, and this means charts in xlsx files are not exported to pdf, html, renderobject, or any place. As mentioned in my last post, we are working on it and a xlsx chart engine is the main feature for the upcoming FlexCel 7, but it does take a lot of time to get all the chart rendering details right.
Do you have a time frame for the 7 release?
While we do have internal estimates, 15 years of developing FlexCel tend to show me that those are normally completely wrong, so we try not to make them public until we are really near the date of release. Estimating dev time in a project like this is basically impossible, because it depends in how many support questions you get in the day. Lately support has been very active, and this slows down development time a lot, because while charts are the most important dev thing right now, bugs and support have even higher priority. So I estimate I will develop feature x today, and end up using the whole week to debug a weird bug that only happened in very special cases.
For what it is worth, we are already delayed, charts were supposed to be ready for december, but there is still a lof of work pending to do.