• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Page Break & hidden rows

MrBramme

Member
Hi,

I'm currently preparing some code that generates 200 reports automatically. There's just one problem i can't solve.

I've got my "master" template all set up with page breaks, and at the end of the line it's saved to PDF (Yuck, PDF. don't shoot me, it's how they want it :) ).
The problem i'm facing now is example:
row 1 to 25 is one page, 26 to 50 another, 51-75 page 3 and 76-100 page 4 (simplistic example). For a certain case rows 26-50 are irrelevant so i set them to hide.
When saving this to PDF (or excel) it still gives me a second page and leaves it blank, rather than just skipping it and saving pages 1, 3 en 4.

Any clue's? I didn't find a sollution using google :)
 
Hi ,

The reason must be in your code.

Why do you want to hide and unhide rows ? Can you not have boolean flags or YES/NO , 1/0 tags for each page , and your code checks these flags / tags in order to decide whether each page needs to be saved or not ?

Narayan
 
Thanks, that was my back-up plan really, was hoping it would be a simple matter of flicking an option to true or false before saving :)
 
Hi ,

I tried it out with Automatic Page Breaks ( those set by Excel based on the Page size and the Margins ) and with Manual Page Breaks ( set by me ).

In the first case , when you hide rows on one page , Excel automatically reduces the number of pages in the print out ; in the second case it does not.

Narayan
 
Back
Top