in reply to Re: Perl (WIN32::OLE) Excel help -- Chart Axis Scaling
in thread Perl (WIN32::OLE) Excel help -- Chart Axis Scaling

Hi, when I did a Macro. I saw the codes generated
...Axes.TickLabelSpacing = 1;

Then I do the following in perl:

...$Xaxes->{TickLabelSpacing} = 1;

And it said there was an error, so I did the following:

...$Xaxes->{TickLabelSpacing}->{Value} = 1;

error:
OLE exception from "Microsoft Office Excel":
Unable to get the TickLabelSpacing property of the Axis class
Win32::OLE(0.1709) error 0x80020009: "Exception occurred" in METHOD/PROPERTYGET "TickLabelSpacing" at ...

And I saw it on
http://msdn.microsoft.com/en-us/library/aa218119(office.10).aspx

ChartSpace1.Charts(0).Axes(1).TickLabelSpacing = 2

I'm not sure where to go from here.

Replies are listed 'Best First'.
Re^3: Perl (WIN32::OLE) Excel help -- Chart Axis Scaling
by Corion (Patriarch) on Apr 21, 2009 at 16:16 UTC
    And it said there was an error,

    What</ error, and who said there was one?

    If the documentation says that TickLabelSpacing is a property, then you can also try

    ->LetProperty('TickLabelSpacing', $OtherObject);

    (as the Win32::OLE documentation says), or a SetProperty call to do what you want.

      I just realized I picked the wrong chart type to begin with.

      I should've picked 'xlLineMarkers' instead of the XYScatterplot.

      Anyways, thanks for all the help. :-)