Question

The Excel Print Preview UI has a 3 print settings:

  1. Print Active Sheets
  2. Print Entire Workbook
  3. Print Selection

I'm generating an Excel Workbook on the fly using EPPlus and would like to have the Print Entire Workbook option selected by default. I do not see where to set this in the PrintArea setting.

I tried setting it in the UI, saving the workbook locally and opening it with EPPlus and the PrintArea of each Worksheet was null. Setting the PrintArea to null does not change this print setting, it remains Print Active Sheets.

How do I set the Print Entire Workbook print setting using EPPlus?

enter image description here

Was it helpful?

Solution

After further testing, this does not appear to be possible.

Even after selecting "Print Entire Workbook", saving the Workbook, closing it, and reopening it, the default "Print Active Sheets" is selected so this leads me to believe that this setting is not stored anywhere in the actual file, just stored within the Excel "session".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top