PaginatedSaveOptions.SheetSet

PaginatedSaveOptions.SheetSet property

Gets or sets the sheets to render. Default is all visible sheets in the workbook: Visible.

public SheetSet SheetSet { get; set; }

Examples

The following code only renders active sheet to pdf.

Workbook workbook = new Workbook("Book1.xlsx");

int activeSheetIndex = workbook.Worksheets.ActiveSheetIndex;

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
//set active sheet index to sheet set.
pdfSaveOptions.SheetSet = new SheetSet(new int[] { activeSheetIndex });
workbook.Save("output.pdf", pdfSaveOptions);

See Also