Click here to Skip to main content
13,044,428 members (115,477 online)
Click here to Skip to main content
Add your own
alternative version

Stats

13.6K views
1.7K downloads
17 bookmarked
Posted 9 Apr 2013

Working with Excel in MFC

, 9 Apr 2013
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!

History

  • 9th April, 2013: Initial version.
  • 2 Dec 2015: Update the source code.

License

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

Share

About the Author

Flaviu2
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 
AnswerRe: Worksheet not changed... Pin
KimJinWoo29-Nov-15 2:06
memberKimJinWoo29-Nov-15 2:06 
GeneralRe: Worksheet not changed... Pin
Flaviu22-Dec-15 1:08
memberFlaviu22-Dec-15 1:08 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 9 Apr 2013
Article Copyright 2013 by Flaviu2
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid