WorkbookRender

WorkbookRender class

Represents a Workbook render. The constructor of this class , must be used after modification of pagesetup, cell style.

Constructors

NameDescription
WorkbookRenderThe construct of WorkbookRender

Properties

NameTypeDescription
PageCountNumberGets the total page count of workbook.

Methods

NameDescription
getPageSizeInchGet page size in inch of output image.
toImageRender whole workbook as Tiff Image to a file.
toPrinterRender workbook to Printer

WorkbookRender(workbook, options)

The construct of WorkbookRender

ParameterTypeDescription
workbookWorkbookIndicate which workbook to be rendered.
optionsImageOrPrintOptionsImageOrPrintOptions contains some property of output image

WorkbookRender.PageCount property

Gets the total page count of workbook.

Type: Number

getPageSizeInch(pageIndex)

Get page size in inch of output image.

ParameterTypeDescription
pageIndexNumberThe page index is based on zero.

Returns: Page size of image, [0] for width and [1] for height

toImage(filename) (1 of 3)

Render whole workbook as Tiff Image to a file.

ParameterTypeDescription
filenameStringthe filename of the output image

toImage(pageIndex, fileName) (2 of 3)

Render certain page to a file.

ParameterTypeDescription
pageIndexNumberindicate which page is to be converted
fileNameStringfilename of the output image

toImage(pageIndex, stream) (3 of 3)

Render certain page to a stream.

ParameterTypeDescription
pageIndexNumberindicate which page is to be converted
streamOutputStreamthe stream of the output image

toPrinter(printerName) (1 of 2)

Render workbook to Printer

ParameterTypeDescription
printerNameStringthe name of the printer , for example: “Microsoft Office Document Image Writer”

toPrinter(printerName, jobName) (2 of 2)

Render workbook to Printer

ParameterTypeDescription
printerNameStringthe name of the printer , for example: “Microsoft Office Document Image Writer”
jobNameStringset the print job name