|
-
March 8th, 2011, 09:24 AM
#1
how to change the chart axis of excel automation by MFC
Dear Gurus,
I use MFC to automate excel to plot charts. I want to change the axis range of the chart.
Do you know how I can do that?
Thank you in advance!
Jing
-
March 8th, 2011, 11:15 AM
#2
Re: how to change the chart axis of excel automation by MFC
One again I take this from a very old program. It will be similar but the
exact method names have probably changed.
Code:
Axis axx, ayy;
axx = chart.Axes(COleVariant((short)1), 1);
axx.SetMaximumScaleIsAuto(FALSE)
axx.SetHasMajorGridlines(FALSE);
axx.SetMaximumScale(20.0);
axx.SetMinimumScale(0.0);
ayy = chart.Axes(COleVariant((short)2), 1);
...etc....
Verere testudinem! (Fear the turtle)
Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy. -Albert Einstein
Robots are trying to steal my luggage.
-
March 8th, 2011, 12:03 PM
#3
Re: how to change the chart axis of excel automation by MFC
Dear Tom,
Thank you so much!
They change a little bit, but essentially it is the same thing. I browed the msdn library, unfortunately cannot figure out the parameter in the Axes method.
Thank you again! You are such a life saver!
Jing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|