SheetPrintingPreview

Inheritance: java.lang.Object

public class SheetPrintingPreview

Worksheet printing preview.

Constructors

ConstructorDescription
SheetPrintingPreview(Worksheet sheet, ImageOrPrintOptions options)The construct of SheetPrintingPreview

Methods

MethodDescription
equals(Object arg0)
getClass()
getEvaluatedPageCount()Evaluate the total page count of this worksheet
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

SheetPrintingPreview(Worksheet sheet, ImageOrPrintOptions options)

public SheetPrintingPreview(Worksheet sheet, ImageOrPrintOptions options)

The construct of SheetPrintingPreview

Parameters:

ParameterTypeDescription
sheetWorksheetIndicate which spreadsheet to be printed.
optionsImageOrPrintOptionsImageOrPrintOptions contains some property of output

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEvaluatedPageCount()

public int getEvaluatedPageCount()

Evaluate the total page count of this worksheet

Example

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

         Workbook workbook = new Workbook("Book1.xlsx");
 
         SheetPrintingPreview sheetPrintingPreview = new SheetPrintingPreview(workbook.getWorksheets().get(0), new ImageOrPrintOptions());
 
         //fastest way to get page count especailly when there are massive data in worksheet.
         System.out.println(sheetPrintingPreview.getEvaluatedPageCount());

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int