in reply to Win32::OLE, Excel, & page scaling and printing

As the Anonymous Monk said, the MSDN Excel reference can be quite useful. I found this VB code in reference to the PageSetup.FitToPagesTall Property:
With Worksheets("Sheet1").PageSetup .Zoom = False .FitToPagesTall = 1 .FitToPagesWide = 1 End With

It lookslike you need to make sure that the PageSetup.Zoom property is false. The proper way to do this is defined in the node: Using Win32::OLE and Excel - Tips and Tricks as already referenced by Anonymous Monk. Note that the example in that node does exactly what you want, setting the page scaling to 1 page exactly.

Replies are listed 'Best First'.
Re^2: Win32::OLE, Excel, & page scaling and printing
by sphinxy09 (Initiate) on Jan 20, 2010 at 14:22 UTC
    Making zoom equal to false, or true, and then setting the page scaling also has not worked for me. Is there some quirk about Perl that I need to use a different hash value for FitToPagesTall and FitToPagesWide, or make them both equal to something other than 1? For example, to set the page orientation to landscape in Perl you must write
    $worksheet -> PageSetup -> {Orientation} = 2;
    but in VB you'd set the Orientation to "x1Landscape".