in reply to Re: Re: Re: Re: Problem with Excel and Win32::OLE
in thread Problem with Excel and Win32::OLE

Selection.TickLabels.AutoScaleFont = False $Excel->Selection->ThickLabels({AutoScaleFont => 0});

The first line is from the VBA code, the second is perl. See the extra 'h'?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Problem with Excel and Win32::OLE
by Streen (Sexton) on May 10, 2004 at 08:04 UTC
    D'oh,
    and I searched hours for a solution...

    But the code:
    $Chart -> Axes(xlCategory) -> Select; $Excel->Selection->TickLabels({Font => {Size => 8}});

    Still won't function, it should resize the Font of the xlCategory in a chart to 8, but it still remains at the default size of 10... I tried several versions, but still won't function...

    Thanks for help...
      TickLabels is not a function, so don't use it like one.

      $Excel->Selection->TickLabels({Font => {Size => 8}});
      Should be (Untested!)
      $Excel->Selection->TickLabels->Font->{Size} = 8;

      This stuff is fundamental to using OLE from perl. You need to read the Win32::OLE docs as well as Excel's help file to help you understand how to translate from VB to perl.