Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to set a Page Break? #314

Open
jaraiza opened this issue Sep 21, 2021 · 1 comment
Open

Is there any way to set a Page Break? #314

jaraiza opened this issue Sep 21, 2021 · 1 comment

Comments

@jaraiza
Copy link

jaraiza commented Sep 21, 2021

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
Copy link
Author

jaraiza commented Sep 22, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant