in reply to Win32::OLE Excel Chart Help

Use The Macro Recorder, Luke (Re: Using Win32::OLE and Excel - Tips and Tricks)

Replies are listed 'Best First'.
Re^2: Win32::OLE Excel Chart Help
by lvleph (Initiate) on Jul 19, 2008 at 16:13 UTC
    I actually got that far using the macro-recorder in Excel. The following was the code given by the macro-recorder:
    ActiveChart.SeriesCollection(1).XValues = _ "='Differentiated Fathers'!$C$2:$C$26"

    I think I just don't know how to translate that.

    I originally tried
    $Chart->SeriesCollection($series)->{XValues} = $Range;
    But that gave the following error:
    Win32::OLE(0.1709) error 0x80020003: "Member not found"
    in PROPERTYPUTREF "XValues" at ./PollenAVG.pl line 150

    If I get rid of the curly braces:
    $Chart->SeriesCollection($series)->XValues = $Range;
    Can't modify non-lvalue subroutine call at ./PollenAVG.pl line 150.