Class WorkbookPrintingPreview

Class WorkbookPrintingPreview

Namespace: Aspose.Cells.Rendering
Assembly: Aspose.Cells.dll (25.2.0)

Workbook printing preview.

public class WorkbookPrintingPreview

Inheritance

objectWorkbookPrintingPreview

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

WorkbookPrintingPreview(Workbook, ImageOrPrintOptions)

The construct of WorkbookPrintingPreview

public WorkbookPrintingPreview(Workbook workbook, ImageOrPrintOptions options)

Parameters

workbook Workbook

Indicate which workbook to be printed.

options ImageOrPrintOptions

ImageOrPrintOptions contains some property of output

Properties

EvaluatedPageCount

Evaluate the total page count of this workbook

public int EvaluatedPageCount { get; }

Property Value

int

Examples

The following code shows the fastest way to get page count of a workbook.

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

WorkbookPrintingPreview workbookPrintingPreview = new WorkbookPrintingPreview(workbook, new ImageOrPrintOptions());

//fastest way to get page count especailly when there are massive data in workbook.
Console.WriteLine(workbookPrintingPreview.EvaluatedPageCount);