in reply to Win32::OLE set worksheet view with Zoom 75%


The zoom level is a property of the Window object which is in turn part of the Excel Application object. Here is a short example of how to set it:
#!/usr/bin/perl -w use strict; use Cwd; use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; my $application = Win32::OLE->new("Excel.Application"); my $workbook = $application->Workbooks->Add; my $worksheet = $workbook->Worksheets(1); my $window = $application->Windows(1); # Set the sheet zoom level. $window->{Zoom} = 75; # Write some text. $worksheet->Cells(1,1)->{Value} = "Hello World"; my $dir = cwd(); $workbook->SaveAs({FileName => $dir . '/win32ole.xls'}); $workbook->Close; __END__

--
John.