Using the Code
A few coders asked me to share my developed COlezAutomation which is taken from here, because somewhere, I wrote that I developed a little bit of existing classes. So, I was thinking of putting up a small example here of how you can play with Excel charting via OleAutomation, even with more than one series. Of course, you can do almost any operation with Excel (exporting, importing, working with formulas, working with worksheets, etc.), but I think that the charting operation is useful here.
After some tests, if Excel is properly installed, on
CMainFrame::OnHelpPlayexcel, you can start a window top most dialog from where you can control an Excel charting (like extern application), with two kinds of charts (pie and column, 3D or not), and from "
Randomize" button, you can generate one or more charts series.
Of course, you can integrate the Excel application in your, let's say MDI application, like ActiveX control, to have an "all in house" solution.
There are not many things to say, the credit goes to Val Golovlev, who I thank again. I just want to share what I have from this class.
- 9th April, 2013: Initial version.
- 2 Dec 2015: Update the source code.