Class SheetPrintingPreview

SheetPrintingPreview class

Worksheet printing preview.

public class SheetPrintingPreview

Constructors

NameDescription
SheetPrintingPreview(Worksheet, ImageOrPrintOptions)The construct of SheetPrintingPreview

Properties

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

Examples

[C#]

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

    public class SheetPrintingPreviewDemo
    {
        public static void SheetPrintingPreviewExample()
        {
            // Load an existing workbook
            Workbook workbook = new Workbook("SheetPrintingPreviewDemo_original.xlsx");

            // Get the first worksheet
            Worksheet worksheet = workbook.Worksheets[0];

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

            // Create an instance of SheetPrintingPreview
            SheetPrintingPreview sheetPrintingPreview = new SheetPrintingPreview(worksheet, options);

            // Evaluate and print the total page count of the worksheet
            Console.WriteLine("Total Page Count: " + sheetPrintingPreview.EvaluatedPageCount);
        }
    }
}

See Also