Skip to main content linkedinfacebooktwittermenuarrow-up
10

Support for multiple print areas Completed

Request for adding support for multiple print areas.   GemBox.Spreadsheet offers an API for setting a print area on each worksheet, with a SetPrintArea method:

https://www.gemboxsoftware.com/spreadsheet/docs/GemBox.Spreadsheet.NamedRangeCollection.html#GemBox_Spreadsheet_NamedRangeCollection_SetPrintArea_

On the following link there is an example that demonstrates how to set worksheet's print area:

https://www.gemboxsoftware.com/spreadsheet/examples/excel-print-title-area/104

Currently, this method supports setting only a single cell range as a print area.

Official response

Mario at GemBox

Hi,

GemBox.Spreadsheet introduced support for this, it is accomplished by using "SetPrintArea(IEnumerable<CellRange> ranges)" overload method:
https://www.gemboxsoftware.com/spreadsheet/docs/GemBox.Spreadsheet.NamedRangeCollection.html#GemBox_Spreadsheet_NamedRangeCollection_SetPrintArea_System_Collections_Generic_IEnumerable_GemBox_Spreadsheet_CellRange__

Regards,
Mario