PHP_XLSXWriter icon indicating copy to clipboard operation
PHP_XLSXWriter copied to clipboard

Is there any way to set a Page Break?

Open jaraiza opened this issue 3 years ago • 1 comments

Hi, I've tried to use the same format as PHPExcel:

$writer->getActiveSheet()->setBreak( 'A15', PHPExcel_Worksheet::BREAK_ROW );

but then I realized there's no "getActiveSheet" neither "setBreak" code inside xlsxwriter.class.php. Is there any way to accomplish that?

image

Thanks!

jaraiza avatar Sep 21 '21 16:09 jaraiza

Ok, I've found that editing the XML I can set manually the page breaks

Under line 319 $sheet->file_writer->write( '</headerFooter>');

I can add this: $sheet->file_writer->write( '<rowBreaks count="1" manualBreakCount="1">'); $sheet->file_writer->write( '<brk id="8" max="16383" man="1"/>'); $sheet->file_writer->write( '</rowBreaks>');

And the file is created with a row break below row 8.

Any ideas on how to add a function to recreate this behavior?

Thanks!

jaraiza avatar Sep 22 '21 19:09 jaraiza