in reply to Re^4: excel page breaks???
in thread Help inserting page break in Microsoft Excel using OLE

Looks like you have an extra P in HPageBreaks. Try removing that (I'm simply comparing to ikegami's code)
--------------
It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs

Replies are listed 'Best First'.
Re^6: excel page breaks???
by jobs_ron (Acolyte) on Mar 01, 2005 at 19:05 UTC
    Don't I feel like a sap? Thank you. Here is the new code:
    use warnings; use strict; use OLE; use Win32::OLE::Const 'Microsoft Excel'; my $excel = CreateObject OLE 'Excel.Application'; my $workbook = $excel -> Workbooks -> Add; my $sheet = $workbook -> Worksheets("Sheet1"); $sheet -> Activate(); $sheet -> Range("6:6") -> Activate(); $sheet -> HPageBreaks -> Add(Before => $sheet -> ActiveCell);
    Now there is no error message, but still no page break.