Click here to Skip to main content
11,789,512 members (36,216 online)
Click here to Skip to main content

Working with Excel in MFC

, 9 Apr 2013 CPOL 8.3K 1.1K 17
Rate this:
Please Sign up or sign in to vote.
Improved Excel class

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.

Enjoy it!


  • 9th April, 2013: Initial version


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Romania Romania
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionWorksheet not changed... Pin
Hyun-woo Jang14-Sep-14 23:06
memberHyun-woo Jang14-Sep-14 23:06 
AnswerRe: Worksheet not changed... Pin
Flaviu214-Sep-14 23:53
memberFlaviu214-Sep-14 23:53 
AnswerRe: Worksheet not changed... Pin
Flaviu215-Sep-14 20:44
memberFlaviu215-Sep-14 20:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1509028.1 | Last Updated 9 Apr 2013
Article Copyright 2013 by Flaviu2
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid