Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David Lawson
 
Posts: n/a
Default setting gridlines in c++?

I've been able to cause VC++ 6.0 (no mfc) to create a chart in excel. Eg,

.....

chart-ChartWizard(
(Excel::Range*) range, // source
(long) Excel::xlXYScatter, // Gallery
6L, // Format (1-10)
(long) Excel::xlColumns, // PlotBy
1L, // 1 CategoryLabels
0L, // 0 SeriesLabels
2L,
title,
"Time",
"Value"
);


I can then set the name of the chart with:

chart-Name = "Test Plot";

Now I'd like to turn on the axes major and minor grid lines, but can't figure out the syntax.
I tried this:

chart-Axes(Excel::xlValue, Excel::xlPrimary)-HasMajorGridlines = 1;
but get a compilation error:

\main.cpp(870) : error C2664: 'Axes' : cannot convert parameter 1 from 'enum Excel::XlAxisType' to
'const class _variant_t &'
Reason: cannot convert from 'enum Excel::XlAxisType' to 'const class _variant_t'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\_flo5\excel\main.cpp(870) : error C2227: left of '-HasMajorGridlines' must point to
class/struct/union


Can someone tell me what the correct way to do this is in C++?

thanks,
David


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
gridlines Sewells Excel Worksheet Functions 1 February 15th 05 10:59 PM
How do you add gridlines? greenwood Excel Worksheet Functions 1 January 14th 05 08:21 PM
How to display gridlines at irregular intervals? Jason Weiss Charts and Charting in Excel 2 January 3rd 05 07:30 PM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
re-install gridlines Janice Excel Worksheet Functions 0 November 11th 04 03:24 PM


All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"