Class WorkbookPrintingPreview

WorkbookPrintingPreview class

Workbook printing preview.

public class WorkbookPrintingPreview

Constructors

NameDescription
WorkbookPrintingPreview(Workbook, ImageOrPrintOptions)The construct of WorkbookPrintingPreview

Properties

NameDescription
EvaluatedPageCount { get; }Evaluate the total page count of this workbook

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Rendering;
    using System;

    public class WorkbookPrintingPreviewDemo
    {
        public static void WorkbookPrintingPreviewExample()
        {
            // Load an existing workbook
            Workbook workbook = new Workbook("WorkbookPrintingPreviewExample_original.xlsx");

            // Create an instance of ImageOrPrintOptions
            ImageOrPrintOptions options = new ImageOrPrintOptions();

            // Create an instance of WorkbookPrintingPreview
            WorkbookPrintingPreview workbookPrintingPreview = new WorkbookPrintingPreview(workbook, options);

            // Evaluate the total page count of the workbook
            int pageCount = workbookPrintingPreview.EvaluatedPageCount;

            // Print the evaluated page count
            Console.WriteLine("Total Page Count: " + pageCount);
        }
    }
}

See Also