문제

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

도움이 되었습니까?

해결책

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".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top