in reply to Trouble adding a secondary Axis to an Excel chart

Hardcore VB Article and Sample Code

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

  • Comment on Re: Trouble adding a secondary Axis to an Excel chart

Replies are listed 'Best First'.
Re: Re: Trouble adding a secondary Axis to an Excel chart
by bshaner (Initiate) on Sep 25, 2003 at 16:09 UTC
    This is an interesting article, but I am looking to do this with perl and Excel.
    The program produces 3 worksheets of data and a chart . Producing the data sheets and the basic chart works great. (Thanks to the OLE tutorial)
    Now I just need to add the second axis to the chart and get 4 of the data series to use the secondary axis.

      Yes so you will need to know how it is done in VB.....because this is how you will do it using Win32::OLE and the chances of you finding VB code to do X on windows are high. The chances of finding an example in Perl using OLE is much lower.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

        I think I am getting closer. In VB the command is
        Charts("Chart1").HasAxis(xlValue, xlPrimary) = True
        After some more digging in the Win32::OLE documentation I can turn the primary axis on and off with
        $Chart->SetProperty('HasAxis', xlValue, xlPrimary , 'True');
        When I change to the xlSecondary axis the command runs without error but the axis does not turn on.
        Very puzzling. Back to digging. Thanks for your help.