First, Thanks so much for your Excel OLE tutorial it was great!

I am trying to automate creating a two axis chart.   It has 5 series of data. The first one uses a primary linear axis, the other 4 use a precentage secondary axis.   I created the chart using chart wizard and I am hitting a wall adding the secondary axis.

The VB example in the excell help file says to use Charts("Chart1").HasAxis(xlValue, xlPrimary) = True to activate a primary axis.   So I tried $Chart->{HasAxis(xlValue, xlSecondary)} = 'True'; and $Chart->HasAxis(xlValue, xlSecondary);

Neither work. The first failes with message from perl telling me the &HasAxis in Main is undefined and the second runs but any attmpt to use the secondary axis fails with a OLE error. I have been digging on this for a while can you help?

janitored by ybiC: PM link ([id://node_number]) to referenced tutorial, minor formatting cleanup


In reply to Trouble adding a secondary Axis to an Excel chart by bshaner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.