in reply to Win32::OLE and Excel and the Web
I ran your code on my Win2000adv without any problems either. Jmcnamara has the right of it, though. You will need to cast some of the properties as Variants to insure that you will get what you expect, especially the 'Zoom' property in this case.
I'll add an example of variant use like this to my tutorial -- Must have slipped by me.
my $vtfalse = Variant(VT_BOOL, 0); my $vtpages = Variant(VT_I4, 1); with ($Sheet->PageSetup, 'FitToPagesWide'=>$vtpages, 'FitToPagesTall'=>$vtpages, 'Zoom'=>$vtfalse, 'PrintGridlines'=>0, 'LeftHeader'=> "REPORT #DW2009A\rSummary Place of Service", 'CenterHeader' => "Empty", 'RightHeader' => "Test Report", 'LeftFooter' => "Done", 'CenterFooter' => "Now", 'Orientation' => xlLandscape, 'RightFooter' => "OK", 'PrintHeadings'=>0, 'FirstPageNumber'=> xlAutomatic, 'PrintTitleRows' => "1:1");
C-.
Update: Upon further investigation, I found that I *had* include an example of fitting a sheet to one page in the tutorial (including the 'Zoom'), but *hadn't* used VT_I4 types in the FitToPages(Wide|Tall) properties.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Win32::OLE and Excel and the Web
by Lando (Initiate) on May 01, 2002 at 18:46 UTC | |
by cacharbe (Curate) on May 02, 2002 at 12:20 UTC | |
by Lando (Initiate) on May 02, 2002 at 17:17 UTC | |
by Anonymous Monk on Oct 02, 2002 at 20:53 UTC | |
by SleepingMonk (Novice) on Jul 17, 2003 at 11:05 UTC |
In Section
Seekers of Perl Wisdom