set_v_pagebreaks(@breaks)
Add vertical page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Vertical page breaks act between columns. To create a page break between columns 20 and 21 you must specify the break at column 21. However in zero index notation this is actually column 20. So you can pretend for a small while that you are using 1 index notation:
$worksheet1->set_v_pagebreaks(20); # Break between column 20 and 21
The set_v_pagebreaks() method will accept a list of page breaks and you can call it more than once:
$worksheet2->set_v_pagebreaks( 20, 40, 60, 80, 100); # Add breaks
$worksheet2->set_v_pagebreaks(120, 140, 160, 180, 200); # Add some more
Note: If you specify the ``fit to page'' option via the fit_to_pages() method it will override all manual page breaks.
my($frage, $antwort) = @$e;
# Eintrag schreiben
#---------- So könnte es gehen! ------------
if ($frage =~ /^###BREAK###/) {
set_v_pagebreaks( $row++ );
next;
}
#----------
$sheet->write($row, 2*$col,
"$frage - $antwort");
\n\n
<!--EDIT|GwenDragon|1114438444-->