Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi all,
i have an app that exports excel graphs using "#import excel.h" directive, now i'm converting the app to use a automation class generated by Microsoft Studio 6.0 Class Wizard( that has all modules/properties ). I'm having some trouble converting the line: series-Fill-OneColorGradient( Office::msoGradientHorizontal, 4, 0.25 ); i have converted to: #define CovOptionalParam COleVariant((long)DISP_E_PARAMNOTFOUND, VT_ERROR) SeriesCollection series_collection = wrkChart.SeriesCollection(CovOptionalParam); int nSeries = series_collection.GetCount(); for( int iSeries=0; iSeries<nSeries; ++iSeries ) { Series series_obj = series_collection.Item( _variant_t((short)(iSeries + 1)) ); FillFormat fill_format = series.GetFill(); fill_format.OneColorGradient( msoGradientHorizontal, 4, 0.25 ); } but it does not work an exception is raised, any ideas? thanks for all the help Jose Valente |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
solved ;)
using ITypeInfo methods over the GetFill() return interface LPDISPATCH, i realize that a Series object does not returns an FillFormat interface but instead it returns an ChartFillFormat: ChartFillFormat f = series_obj.GetFill(); f.OneColorGradient( msoGradientHorizontal, 4, 0.25 ); does the trick ;) thanks anyway for all the help Jose Valente "Jose Valente" wrote: hi all, i have an app that exports excel graphs using "#import excel.h" directive, now i'm converting the app to use a automation class generated by Microsoft Studio 6.0 Class Wizard( that has all modules/properties ). I'm having some trouble converting the line: series-Fill-OneColorGradient( Office::msoGradientHorizontal, 4, 0.25 ); i have converted to: #define CovOptionalParam COleVariant((long)DISP_E_PARAMNOTFOUND, VT_ERROR) SeriesCollection series_collection = wrkChart.SeriesCollection(CovOptionalParam); int nSeries = series_collection.GetCount(); for( int iSeries=0; iSeries<nSeries; ++iSeries ) { Series series_obj = series_collection.Item( _variant_t((short)(iSeries + 1)) ); FillFormat fill_format = series.GetFill(); fill_format.OneColorGradient( msoGradientHorizontal, 4, 0.25 ); } but it does not work an exception is raised, any ideas? thanks for all the help Jose Valente |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|