#StackBounty: #microsoft-excel #pdf #printing #pivot-table #print-to-pdf Excel doesn't print all active sheets to PDF

Bounty: 50

When I select sheets in a macro-free workbook (no code involed!) that each may or may not span multiple printed pages, select print to PDF (using Microsoft Print to PDF, selecting “Print Active Sheets”), all pages don’t get included in the PDF.

Specifically, the last couple of sheets are omitted from the result, which is a huge issue, since it basically renders the file useless for its purpose (= PDF report generation).

Most sheets contain one pivot table each that span mulitple printed pages (page layout is restricted to 1 page in width), the last two sheets are static one-pagers.

I can reproduce the issue consistently with this example file.
Example PDF output also available (note the two last sheets are missing). (mirror)

Environment

  • Excel version 1906 (16.0.11727.20222 32-bit)
  • Windows 10 Pro 64-bit

Things I’ve checked for/tested:

  • All pages have same print quality (was noted as a potential issue elsewhere)
  • Using regular “Save As” and selecting PDF gives the same (bad) results.
  • CutePDF writer gives the same (bad) results.
  • Printing to a physical printer prints all pages (good!)
  • If I select only the last couple of sheets, they get included in the PDF as they should. As I expand my sheet selection and print to PDF, at some point it starts “losing” pages at the end of the document.

Observations/clues:

  • Total page count varies throughout the PDF document. See page 21 and 22 in the example PDF linked above, it says “Page 21 of 31”, then “Page 22 of 30” (similar oddity can be observed with CutePDF)
  • Sheets with pivot tables that span multiple sheets seem to be the primary culprit: selecting these for printing seems to have higher likelihood of messing up the output.

I think this is mainly an issue with the print drivers (Microsoft Print to PDF or CutePDF) since printing to a professional printer works as intended, but I could be wrong.

What could be wrong, and how do you suggest I mitigate this? I need the PDF output; this is the primary purpose of the Excel file.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.