Search code examples
perlexcelpageviewspage-breakspreadsheet-excel-writer

Excel::Writer::XLSX Page View and Page Breaks (Perl)


I've searched the API, Google, StackOverflow, etc. trying to find an answer to the following questions, but thus far, my quest has been disappointing. Is anyone out there able to help me out?

1) I'm attempting to use the set_page_view() option to default the worksheet to the "Page Break Preview". Unfortunately the CPAN page does not give me the valid parameters for this function. I've attempted using set_page_view('Page Break Preview'), but that gives me the "Page Layout" view instead.

2) In my script, I reference the set_h_pagebreaks() and set_v_pagebreaks to dynamically place the page-breaks as I write the excel sheet. This works wonderfully, however the worksheets will sometimes create default page-breaks as well. Is there any way to remove the default page breaks using this module?

Thanks for any help that you can provide!! I can provide some of my code-set if need be.


Solution

  • In relation to your questions:

    1. Page Break Preview isn't currently supported by Excel::Writer::XLSX.

    2. The Excel::Writer::XLSX module doesn't do anything to set default page breaks. These are probably set by Excel itself. If they are then Excel::Writer::XLSX doesn't have any facility to remove them.