PageSetup
PageSetup class
Encapsulates the object that represents the page setup description. The PageSetup object contains all page setup options.
class PageSetup;
Example
const { Workbook } = require("aspose.cells.node");
var workbook = new Workbook();
var sheet = workbook.worksheets.get(0);
sheet.pageSetup.printArea = "D1:K13";
sheet.pageSetup.printTitleRows = "$5:$7";
sheet.pageSetup.printTitleColumns = "$A:$B";
Properties
Property | Type | Description |
---|---|---|
oDSPageBackground | OdsPageBackground | Readonly. Gets the background of ODS. |
printArea | string | Represents the range to be printed. |
printTitleColumns | string | Represents the columns that contain the cells to be repeated on the left side of each page. |
printTitleRows | string | Represents the rows that contain the cells to be repeated at the top of each page. |
blackAndWhite | boolean | Represents if elements of the document will be printed in black and white. |
centerHorizontally | boolean | Represent if the sheet is printed centered horizontally. |
centerVertically | boolean | Represent if the sheet is printed centered vertically. |
printDraft | boolean | Represents if the sheet will be printed without graphics. |
footerMargin | number | Represents the distance from the bottom of the page to the footer, in unit of centimeters. |
footerMarginInch | number | Represents the distance from the bottom of the page to the footer, in unit of inches. |
headerMargin | number | Represents the distance from the top of the page to the header, in unit of centimeters. |
headerMarginInch | number | Represents the distance from the top of the page to the header, in unit of inches. |
printerSettings | Uint8Array | Gets and sets the settings of the default printer. |
leftMargin | number | Represents the size of the left margin, in unit of centimeters. |
leftMarginInch | number | Represents the size of the left margin, in unit of inches. |
rightMargin | number | Represents the size of the right margin, in unit of centimeters. |
rightMarginInch | number | Represents the size of the right margin, in unit of inches. |
topMargin | number | Represents the size of the top margin, in unit of centimeters. |
topMarginInch | number | Represents the size of the top margin, in unit of inches. |
bottomMargin | number | Represents the size of the bottom margin, in unit of centimeters. |
bottomMarginInch | number | Represents the size of the bottom margin, in unit of inches. |
firstPageNumber | number | Represents the first page number that will be used when this sheet is printed. |
fitToPagesTall | number | Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1. |
fitToPagesWide | number | Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1. |
isPercentScale | boolean | If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. |
order | PrintOrderType | Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. |
isAutomaticPaperSize | boolean | Readonly. Indicates whether the paper size is automatic. |
paperSize | PaperSizeType | Represents the size of the paper. |
paperWidth | number | Readonly. Gets the width of the paper in unit of inches, considered page orientation. |
paperHeight | number | Readonly. Gets the height of the paper in unit of inches , considered page orientation. |
orientation | PageOrientationType | Represents page print orientation. |
printComments | PrintCommentsType | Represents the way comments are printed with the sheet. |
printErrors | PrintErrorsType | Specifies the type of print error displayed. |
printHeadings | boolean | Represents if row and column headings are printed with this page. |
printGridlines | boolean | Represents if cell gridlines are printed on the page. |
zoom | number | Represents the scaling factor in percent. It should be between 10 and 400. |
isAutoFirstPageNumber | boolean | Indicates whether the first the page number is automatically assigned. |
printQuality | number | Represents the print quality. |
printCopies | number | Get and sets number of copies to print. |
isHFDiffOddEven | boolean | True means that the header/footer of the odd pages is different with odd pages. |
isHFDiffFirst | boolean | True means that the header/footer of the first page is different with other pages. |
isHFScaleWithDoc | boolean | Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007. |
isHFAlignMargins | boolean | Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default. |
Methods
Method | Description |
---|---|
getODSPageBackground() | @deprecated. Please use the ‘oDSPageBackground’ property instead. Gets the background of ODS. |
getPrintArea() | @deprecated. Please use the ‘printArea’ property instead. Represents the range to be printed. |
setPrintArea(string) | @deprecated. Please use the ‘printArea’ property instead. Represents the range to be printed. |
getPrintTitleColumns() | @deprecated. Please use the ‘printTitleColumns’ property instead. Represents the columns that contain the cells to be repeated on the left side of each page. |
setPrintTitleColumns(string) | @deprecated. Please use the ‘printTitleColumns’ property instead. Represents the columns that contain the cells to be repeated on the left side of each page. |
getPrintTitleRows() | @deprecated. Please use the ‘printTitleRows’ property instead. Represents the rows that contain the cells to be repeated at the top of each page. |
setPrintTitleRows(string) | @deprecated. Please use the ‘printTitleRows’ property instead. Represents the rows that contain the cells to be repeated at the top of each page. |
getBlackAndWhite() | @deprecated. Please use the ‘blackAndWhite’ property instead. Represents if elements of the document will be printed in black and white. |
setBlackAndWhite(boolean) | @deprecated. Please use the ‘blackAndWhite’ property instead. Represents if elements of the document will be printed in black and white. |
getCenterHorizontally() | @deprecated. Please use the ‘centerHorizontally’ property instead. Represent if the sheet is printed centered horizontally. |
setCenterHorizontally(boolean) | @deprecated. Please use the ‘centerHorizontally’ property instead. Represent if the sheet is printed centered horizontally. |
getCenterVertically() | @deprecated. Please use the ‘centerVertically’ property instead. Represent if the sheet is printed centered vertically. |
setCenterVertically(boolean) | @deprecated. Please use the ‘centerVertically’ property instead. Represent if the sheet is printed centered vertically. |
getPrintDraft() | @deprecated. Please use the ‘printDraft’ property instead. Represents if the sheet will be printed without graphics. |
setPrintDraft(boolean) | @deprecated. Please use the ‘printDraft’ property instead. Represents if the sheet will be printed without graphics. |
getFooterMargin() | @deprecated. Please use the ‘footerMargin’ property instead. Represents the distance from the bottom of the page to the footer, in unit of centimeters. |
setFooterMargin(number) | @deprecated. Please use the ‘footerMargin’ property instead. Represents the distance from the bottom of the page to the footer, in unit of centimeters. |
getFooterMarginInch() | @deprecated. Please use the ‘footerMarginInch’ property instead. Represents the distance from the bottom of the page to the footer, in unit of inches. |
setFooterMarginInch(number) | @deprecated. Please use the ‘footerMarginInch’ property instead. Represents the distance from the bottom of the page to the footer, in unit of inches. |
getHeaderMargin() | @deprecated. Please use the ‘headerMargin’ property instead. Represents the distance from the top of the page to the header, in unit of centimeters. |
setHeaderMargin(number) | @deprecated. Please use the ‘headerMargin’ property instead. Represents the distance from the top of the page to the header, in unit of centimeters. |
getHeaderMarginInch() | @deprecated. Please use the ‘headerMarginInch’ property instead. Represents the distance from the top of the page to the header, in unit of inches. |
setHeaderMarginInch(number) | @deprecated. Please use the ‘headerMarginInch’ property instead. Represents the distance from the top of the page to the header, in unit of inches. |
getPrinterSettings() | @deprecated. Please use the ‘printerSettings’ property instead. Gets and sets the settings of the default printer. |
setPrinterSettings(Uint8Array) | @deprecated. Please use the ‘printerSettings’ property instead. Gets and sets the settings of the default printer. |
getLeftMargin() | @deprecated. Please use the ’leftMargin’ property instead. Represents the size of the left margin, in unit of centimeters. |
setLeftMargin(number) | @deprecated. Please use the ’leftMargin’ property instead. Represents the size of the left margin, in unit of centimeters. |
getLeftMarginInch() | @deprecated. Please use the ’leftMarginInch’ property instead. Represents the size of the left margin, in unit of inches. |
setLeftMarginInch(number) | @deprecated. Please use the ’leftMarginInch’ property instead. Represents the size of the left margin, in unit of inches. |
getRightMargin() | @deprecated. Please use the ‘rightMargin’ property instead. Represents the size of the right margin, in unit of centimeters. |
setRightMargin(number) | @deprecated. Please use the ‘rightMargin’ property instead. Represents the size of the right margin, in unit of centimeters. |
getRightMarginInch() | @deprecated. Please use the ‘rightMarginInch’ property instead. Represents the size of the right margin, in unit of inches. |
setRightMarginInch(number) | @deprecated. Please use the ‘rightMarginInch’ property instead. Represents the size of the right margin, in unit of inches. |
getTopMargin() | @deprecated. Please use the ’topMargin’ property instead. Represents the size of the top margin, in unit of centimeters. |
setTopMargin(number) | @deprecated. Please use the ’topMargin’ property instead. Represents the size of the top margin, in unit of centimeters. |
getTopMarginInch() | @deprecated. Please use the ’topMarginInch’ property instead. Represents the size of the top margin, in unit of inches. |
setTopMarginInch(number) | @deprecated. Please use the ’topMarginInch’ property instead. Represents the size of the top margin, in unit of inches. |
getBottomMargin() | @deprecated. Please use the ‘bottomMargin’ property instead. Represents the size of the bottom margin, in unit of centimeters. |
setBottomMargin(number) | @deprecated. Please use the ‘bottomMargin’ property instead. Represents the size of the bottom margin, in unit of centimeters. |
getBottomMarginInch() | @deprecated. Please use the ‘bottomMarginInch’ property instead. Represents the size of the bottom margin, in unit of inches. |
setBottomMarginInch(number) | @deprecated. Please use the ‘bottomMarginInch’ property instead. Represents the size of the bottom margin, in unit of inches. |
getFirstPageNumber() | @deprecated. Please use the ‘firstPageNumber’ property instead. Represents the first page number that will be used when this sheet is printed. |
setFirstPageNumber(number) | @deprecated. Please use the ‘firstPageNumber’ property instead. Represents the first page number that will be used when this sheet is printed. |
getFitToPagesTall() | @deprecated. Please use the ‘fitToPagesTall’ property instead. Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1. |
setFitToPagesTall(number) | @deprecated. Please use the ‘fitToPagesTall’ property instead. Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1. |
getFitToPagesWide() | @deprecated. Please use the ‘fitToPagesWide’ property instead. Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1. |
setFitToPagesWide(number) | @deprecated. Please use the ‘fitToPagesWide’ property instead. Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1. |
isPercentScale() | @deprecated. Please use the ‘isPercentScale’ property instead. If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. |
setIsPercentScale(boolean) | @deprecated. Please use the ‘isPercentScale’ property instead. If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. |
getOrder() | @deprecated. Please use the ‘order’ property instead. Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. |
setOrder(PrintOrderType) | @deprecated. Please use the ‘order’ property instead. Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. |
isAutomaticPaperSize() | @deprecated. Please use the ‘isAutomaticPaperSize’ property instead. Indicates whether the paper size is automatic. |
getPaperSize() | @deprecated. Please use the ‘paperSize’ property instead. Represents the size of the paper. |
setPaperSize(PaperSizeType) | @deprecated. Please use the ‘paperSize’ property instead. Represents the size of the paper. |
getPaperWidth() | @deprecated. Please use the ‘paperWidth’ property instead. Gets the width of the paper in unit of inches, considered page orientation. |
getPaperHeight() | @deprecated. Please use the ‘paperHeight’ property instead. Gets the height of the paper in unit of inches , considered page orientation. |
getOrientation() | @deprecated. Please use the ‘orientation’ property instead. Represents page print orientation. |
setOrientation(PageOrientationType) | @deprecated. Please use the ‘orientation’ property instead. Represents page print orientation. |
getPrintComments() | @deprecated. Please use the ‘printComments’ property instead. Represents the way comments are printed with the sheet. |
setPrintComments(PrintCommentsType) | @deprecated. Please use the ‘printComments’ property instead. Represents the way comments are printed with the sheet. |
getPrintErrors() | @deprecated. Please use the ‘printErrors’ property instead. Specifies the type of print error displayed. |
setPrintErrors(PrintErrorsType) | @deprecated. Please use the ‘printErrors’ property instead. Specifies the type of print error displayed. |
getPrintHeadings() | @deprecated. Please use the ‘printHeadings’ property instead. Represents if row and column headings are printed with this page. |
setPrintHeadings(boolean) | @deprecated. Please use the ‘printHeadings’ property instead. Represents if row and column headings are printed with this page. |
getPrintGridlines() | @deprecated. Please use the ‘printGridlines’ property instead. Represents if cell gridlines are printed on the page. |
setPrintGridlines(boolean) | @deprecated. Please use the ‘printGridlines’ property instead. Represents if cell gridlines are printed on the page. |
getZoom() | @deprecated. Please use the ‘zoom’ property instead. Represents the scaling factor in percent. It should be between 10 and 400. |
setZoom(number) | @deprecated. Please use the ‘zoom’ property instead. Represents the scaling factor in percent. It should be between 10 and 400. |
isAutoFirstPageNumber() | @deprecated. Please use the ‘isAutoFirstPageNumber’ property instead. Indicates whether the first the page number is automatically assigned. |
setIsAutoFirstPageNumber(boolean) | @deprecated. Please use the ‘isAutoFirstPageNumber’ property instead. Indicates whether the first the page number is automatically assigned. |
getPrintQuality() | @deprecated. Please use the ‘printQuality’ property instead. Represents the print quality. |
setPrintQuality(number) | @deprecated. Please use the ‘printQuality’ property instead. Represents the print quality. |
getPrintCopies() | @deprecated. Please use the ‘printCopies’ property instead. Get and sets number of copies to print. |
setPrintCopies(number) | @deprecated. Please use the ‘printCopies’ property instead. Get and sets number of copies to print. |
isHFDiffOddEven() | @deprecated. Please use the ‘isHFDiffOddEven’ property instead. True means that the header/footer of the odd pages is different with odd pages. |
setIsHFDiffOddEven(boolean) | @deprecated. Please use the ‘isHFDiffOddEven’ property instead. True means that the header/footer of the odd pages is different with odd pages. |
isHFDiffFirst() | @deprecated. Please use the ‘isHFDiffFirst’ property instead. True means that the header/footer of the first page is different with other pages. |
setIsHFDiffFirst(boolean) | @deprecated. Please use the ‘isHFDiffFirst’ property instead. True means that the header/footer of the first page is different with other pages. |
isHFScaleWithDoc() | @deprecated. Please use the ‘isHFScaleWithDoc’ property instead. Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007. |
setIsHFScaleWithDoc(boolean) | @deprecated. Please use the ‘isHFScaleWithDoc’ property instead. Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007. |
isHFAlignMargins() | @deprecated. Please use the ‘isHFAlignMargins’ property instead. Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default. |
setIsHFAlignMargins(boolean) | @deprecated. Please use the ‘isHFAlignMargins’ property instead. Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default. |
copy(PageSetup, CopyOptions) | Copies the setting of the page setup. |
setFitToPages(number, number) | Sets the number of pages the worksheet will be scaled to when it’s printed. |
customPaperSize(number, number) | Sets the custom paper size, in unit of inches. |
clearHeaderFooter() | Clears header and footer setting. |
getHeader(number) | Gets a script formatting the header of an Excel file. |
getCommands(string) | Gets all commands of header or footer. |
getFooter(number) | Gets a script formatting the footer of an Excel file. |
setHeader(number, string) | Sets a script formatting the header of an Excel file. |
setFooter(number, string) | Sets a script formatting the footer of an Excel file. |
setEvenHeader(number, string) | Sets a script formatting the even page header of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true. |
getEvenHeader(number) | Gets a script formatting the even header of an Excel file. |
setEvenFooter(number, string) | Sets a script formatting the even page footer of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true. |
getEvenFooter(number) | Gets a script formatting the even footer of an Excel file. |
setFirstPageHeader(number, string) | Sets a script formatting the first page header of an Excel file. Only effect in Excel 2007 when IsHFDiffFirst is true. |
getFirstPageHeader(number) | Gets a script formatting the first page header of an Excel file. |
setFirstPageFooter(number, string) | Sets a script formatting the first page footer of an Excel file. |
getFirstPageFooter(number) | Gets a script formatting the first page footer of an Excel file. |
setHeaderPicture(number, Uint8Array) | Sets an image in the header of a worksheet. |
setFooterPicture(number, Uint8Array) | Sets an image in the footer of a worksheet. |
setPicture(boolean, boolean, boolean, number, Uint8Array) | Sets an image in the header/footer of a worksheet. |
getPicture(boolean, number) | Gets the Picture object of the header / footer. |
getPicture(boolean, boolean, boolean, number) | Gets the Picture object of the header / footer. |
isNull() | Checks whether the implementation object is null. |
oDSPageBackground
Readonly. Gets the background of ODS.
oDSPageBackground : OdsPageBackground;
printArea
Represents the range to be printed.
printArea : string;
printTitleColumns
Represents the columns that contain the cells to be repeated on the left side of each page.
printTitleColumns : string;
printTitleRows
Represents the rows that contain the cells to be repeated at the top of each page.
printTitleRows : string;
blackAndWhite
Represents if elements of the document will be printed in black and white.
blackAndWhite : boolean;
centerHorizontally
Represent if the sheet is printed centered horizontally.
centerHorizontally : boolean;
centerVertically
Represent if the sheet is printed centered vertically.
centerVertically : boolean;
printDraft
Represents if the sheet will be printed without graphics.
printDraft : boolean;
footerMargin
Represents the distance from the bottom of the page to the footer, in unit of centimeters.
footerMargin : number;
footerMarginInch
Represents the distance from the bottom of the page to the footer, in unit of inches.
footerMarginInch : number;
headerMargin
Represents the distance from the top of the page to the header, in unit of centimeters.
headerMargin : number;
headerMarginInch
Represents the distance from the top of the page to the header, in unit of inches.
headerMarginInch : number;
printerSettings
Gets and sets the settings of the default printer.
printerSettings : Uint8Array;
leftMargin
Represents the size of the left margin, in unit of centimeters.
leftMargin : number;
leftMarginInch
Represents the size of the left margin, in unit of inches.
leftMarginInch : number;
rightMargin
Represents the size of the right margin, in unit of centimeters.
rightMargin : number;
rightMarginInch
Represents the size of the right margin, in unit of inches.
rightMarginInch : number;
topMargin
Represents the size of the top margin, in unit of centimeters.
topMargin : number;
topMarginInch
Represents the size of the top margin, in unit of inches.
topMarginInch : number;
bottomMargin
Represents the size of the bottom margin, in unit of centimeters.
bottomMargin : number;
bottomMarginInch
Represents the size of the bottom margin, in unit of inches.
bottomMarginInch : number;
firstPageNumber
Represents the first page number that will be used when this sheet is printed.
firstPageNumber : number;
fitToPagesTall
Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1.
fitToPagesTall : number;
Remarks
You have to set FitToPagesWide as zero if you want to fit all rows on one page.
fitToPagesWide
Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1.
fitToPagesWide : number;
Remarks
You have to set FitToPagesTall as zero if you want to fit all columns on one page.
isPercentScale
If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
isPercentScale : boolean;
order
Represents the order that Microsoft Excel uses to number pages when printing a large worksheet.
order : PrintOrderType;
isAutomaticPaperSize
Readonly. Indicates whether the paper size is automatic.
isAutomaticPaperSize : boolean;
paperSize
Represents the size of the paper.
paperSize : PaperSizeType;
paperWidth
Readonly. Gets the width of the paper in unit of inches, considered page orientation.
paperWidth : number;
paperHeight
Readonly. Gets the height of the paper in unit of inches , considered page orientation.
paperHeight : number;
orientation
Represents page print orientation.
orientation : PageOrientationType;
printComments
Represents the way comments are printed with the sheet.
printComments : PrintCommentsType;
printErrors
Specifies the type of print error displayed.
printErrors : PrintErrorsType;
printHeadings
Represents if row and column headings are printed with this page.
printHeadings : boolean;
printGridlines
Represents if cell gridlines are printed on the page.
printGridlines : boolean;
zoom
Represents the scaling factor in percent. It should be between 10 and 400.
zoom : number;
isAutoFirstPageNumber
Indicates whether the first the page number is automatically assigned.
isAutoFirstPageNumber : boolean;
printQuality
Represents the print quality.
printQuality : number;
printCopies
Get and sets number of copies to print.
printCopies : number;
isHFDiffOddEven
True means that the header/footer of the odd pages is different with odd pages.
isHFDiffOddEven : boolean;
isHFDiffFirst
True means that the header/footer of the first page is different with other pages.
isHFDiffFirst : boolean;
isHFScaleWithDoc
Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.
isHFScaleWithDoc : boolean;
isHFAlignMargins
Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default.
isHFAlignMargins : boolean;
getODSPageBackground()
@deprecated. Please use the ‘oDSPageBackground’ property instead. Gets the background of ODS.
getODSPageBackground() : OdsPageBackground;
Returns
getPrintArea()
@deprecated. Please use the ‘printArea’ property instead. Represents the range to be printed.
getPrintArea() : string;
setPrintArea(string)
@deprecated. Please use the ‘printArea’ property instead. Represents the range to be printed.
setPrintArea(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getPrintTitleColumns()
@deprecated. Please use the ‘printTitleColumns’ property instead. Represents the columns that contain the cells to be repeated on the left side of each page.
getPrintTitleColumns() : string;
setPrintTitleColumns(string)
@deprecated. Please use the ‘printTitleColumns’ property instead. Represents the columns that contain the cells to be repeated on the left side of each page.
setPrintTitleColumns(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getPrintTitleRows()
@deprecated. Please use the ‘printTitleRows’ property instead. Represents the rows that contain the cells to be repeated at the top of each page.
getPrintTitleRows() : string;
setPrintTitleRows(string)
@deprecated. Please use the ‘printTitleRows’ property instead. Represents the rows that contain the cells to be repeated at the top of each page.
setPrintTitleRows(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getBlackAndWhite()
@deprecated. Please use the ‘blackAndWhite’ property instead. Represents if elements of the document will be printed in black and white.
getBlackAndWhite() : boolean;
setBlackAndWhite(boolean)
@deprecated. Please use the ‘blackAndWhite’ property instead. Represents if elements of the document will be printed in black and white.
setBlackAndWhite(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getCenterHorizontally()
@deprecated. Please use the ‘centerHorizontally’ property instead. Represent if the sheet is printed centered horizontally.
getCenterHorizontally() : boolean;
setCenterHorizontally(boolean)
@deprecated. Please use the ‘centerHorizontally’ property instead. Represent if the sheet is printed centered horizontally.
setCenterHorizontally(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getCenterVertically()
@deprecated. Please use the ‘centerVertically’ property instead. Represent if the sheet is printed centered vertically.
getCenterVertically() : boolean;
setCenterVertically(boolean)
@deprecated. Please use the ‘centerVertically’ property instead. Represent if the sheet is printed centered vertically.
setCenterVertically(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getPrintDraft()
@deprecated. Please use the ‘printDraft’ property instead. Represents if the sheet will be printed without graphics.
getPrintDraft() : boolean;
setPrintDraft(boolean)
@deprecated. Please use the ‘printDraft’ property instead. Represents if the sheet will be printed without graphics.
setPrintDraft(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getFooterMargin()
@deprecated. Please use the ‘footerMargin’ property instead. Represents the distance from the bottom of the page to the footer, in unit of centimeters.
getFooterMargin() : number;
setFooterMargin(number)
@deprecated. Please use the ‘footerMargin’ property instead. Represents the distance from the bottom of the page to the footer, in unit of centimeters.
setFooterMargin(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getFooterMarginInch()
@deprecated. Please use the ‘footerMarginInch’ property instead. Represents the distance from the bottom of the page to the footer, in unit of inches.
getFooterMarginInch() : number;
setFooterMarginInch(number)
@deprecated. Please use the ‘footerMarginInch’ property instead. Represents the distance from the bottom of the page to the footer, in unit of inches.
setFooterMarginInch(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getHeaderMargin()
@deprecated. Please use the ‘headerMargin’ property instead. Represents the distance from the top of the page to the header, in unit of centimeters.
getHeaderMargin() : number;
setHeaderMargin(number)
@deprecated. Please use the ‘headerMargin’ property instead. Represents the distance from the top of the page to the header, in unit of centimeters.
setHeaderMargin(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getHeaderMarginInch()
@deprecated. Please use the ‘headerMarginInch’ property instead. Represents the distance from the top of the page to the header, in unit of inches.
getHeaderMarginInch() : number;
setHeaderMarginInch(number)
@deprecated. Please use the ‘headerMarginInch’ property instead. Represents the distance from the top of the page to the header, in unit of inches.
setHeaderMarginInch(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getPrinterSettings()
@deprecated. Please use the ‘printerSettings’ property instead. Gets and sets the settings of the default printer.
getPrinterSettings() : Uint8Array;
setPrinterSettings(Uint8Array)
@deprecated. Please use the ‘printerSettings’ property instead. Gets and sets the settings of the default printer.
setPrinterSettings(value: Uint8Array) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number[] | The value to set. |
getLeftMargin()
@deprecated. Please use the ’leftMargin’ property instead. Represents the size of the left margin, in unit of centimeters.
getLeftMargin() : number;
setLeftMargin(number)
@deprecated. Please use the ’leftMargin’ property instead. Represents the size of the left margin, in unit of centimeters.
setLeftMargin(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getLeftMarginInch()
@deprecated. Please use the ’leftMarginInch’ property instead. Represents the size of the left margin, in unit of inches.
getLeftMarginInch() : number;
setLeftMarginInch(number)
@deprecated. Please use the ’leftMarginInch’ property instead. Represents the size of the left margin, in unit of inches.
setLeftMarginInch(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getRightMargin()
@deprecated. Please use the ‘rightMargin’ property instead. Represents the size of the right margin, in unit of centimeters.
getRightMargin() : number;
setRightMargin(number)
@deprecated. Please use the ‘rightMargin’ property instead. Represents the size of the right margin, in unit of centimeters.
setRightMargin(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getRightMarginInch()
@deprecated. Please use the ‘rightMarginInch’ property instead. Represents the size of the right margin, in unit of inches.
getRightMarginInch() : number;
setRightMarginInch(number)
@deprecated. Please use the ‘rightMarginInch’ property instead. Represents the size of the right margin, in unit of inches.
setRightMarginInch(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getTopMargin()
@deprecated. Please use the ’topMargin’ property instead. Represents the size of the top margin, in unit of centimeters.
getTopMargin() : number;
setTopMargin(number)
@deprecated. Please use the ’topMargin’ property instead. Represents the size of the top margin, in unit of centimeters.
setTopMargin(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getTopMarginInch()
@deprecated. Please use the ’topMarginInch’ property instead. Represents the size of the top margin, in unit of inches.
getTopMarginInch() : number;
setTopMarginInch(number)
@deprecated. Please use the ’topMarginInch’ property instead. Represents the size of the top margin, in unit of inches.
setTopMarginInch(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getBottomMargin()
@deprecated. Please use the ‘bottomMargin’ property instead. Represents the size of the bottom margin, in unit of centimeters.
getBottomMargin() : number;
setBottomMargin(number)
@deprecated. Please use the ‘bottomMargin’ property instead. Represents the size of the bottom margin, in unit of centimeters.
setBottomMargin(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getBottomMarginInch()
@deprecated. Please use the ‘bottomMarginInch’ property instead. Represents the size of the bottom margin, in unit of inches.
getBottomMarginInch() : number;
setBottomMarginInch(number)
@deprecated. Please use the ‘bottomMarginInch’ property instead. Represents the size of the bottom margin, in unit of inches.
setBottomMarginInch(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getFirstPageNumber()
@deprecated. Please use the ‘firstPageNumber’ property instead. Represents the first page number that will be used when this sheet is printed.
getFirstPageNumber() : number;
setFirstPageNumber(number)
@deprecated. Please use the ‘firstPageNumber’ property instead. Represents the first page number that will be used when this sheet is printed.
setFirstPageNumber(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getFitToPagesTall()
@deprecated. Please use the ‘fitToPagesTall’ property instead. Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1.
getFitToPagesTall() : number;
Remarks
You have to set FitToPagesWide as zero if you want to fit all rows on one page.
setFitToPagesTall(number)
@deprecated. Please use the ‘fitToPagesTall’ property instead. Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1.
setFitToPagesTall(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
Remarks
You have to set FitToPagesWide as zero if you want to fit all rows on one page.
getFitToPagesWide()
@deprecated. Please use the ‘fitToPagesWide’ property instead. Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1.
getFitToPagesWide() : number;
Remarks
You have to set FitToPagesTall as zero if you want to fit all columns on one page.
setFitToPagesWide(number)
@deprecated. Please use the ‘fitToPagesWide’ property instead. Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1.
setFitToPagesWide(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
Remarks
You have to set FitToPagesTall as zero if you want to fit all columns on one page.
isPercentScale()
@deprecated. Please use the ‘isPercentScale’ property instead. If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
isPercentScale() : boolean;
setIsPercentScale(boolean)
@deprecated. Please use the ‘isPercentScale’ property instead. If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
setIsPercentScale(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getOrder()
@deprecated. Please use the ‘order’ property instead. Represents the order that Microsoft Excel uses to number pages when printing a large worksheet.
getOrder() : PrintOrderType;
Returns
setOrder(PrintOrderType)
@deprecated. Please use the ‘order’ property instead. Represents the order that Microsoft Excel uses to number pages when printing a large worksheet.
setOrder(value: PrintOrderType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PrintOrderType | The value to set. |
isAutomaticPaperSize()
@deprecated. Please use the ‘isAutomaticPaperSize’ property instead. Indicates whether the paper size is automatic.
isAutomaticPaperSize() : boolean;
getPaperSize()
@deprecated. Please use the ‘paperSize’ property instead. Represents the size of the paper.
getPaperSize() : PaperSizeType;
Returns
setPaperSize(PaperSizeType)
@deprecated. Please use the ‘paperSize’ property instead. Represents the size of the paper.
setPaperSize(value: PaperSizeType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PaperSizeType | The value to set. |
getPaperWidth()
@deprecated. Please use the ‘paperWidth’ property instead. Gets the width of the paper in unit of inches, considered page orientation.
getPaperWidth() : number;
getPaperHeight()
@deprecated. Please use the ‘paperHeight’ property instead. Gets the height of the paper in unit of inches , considered page orientation.
getPaperHeight() : number;
getOrientation()
@deprecated. Please use the ‘orientation’ property instead. Represents page print orientation.
getOrientation() : PageOrientationType;
Returns
setOrientation(PageOrientationType)
@deprecated. Please use the ‘orientation’ property instead. Represents page print orientation.
setOrientation(value: PageOrientationType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PageOrientationType | The value to set. |
getPrintComments()
@deprecated. Please use the ‘printComments’ property instead. Represents the way comments are printed with the sheet.
getPrintComments() : PrintCommentsType;
Returns
setPrintComments(PrintCommentsType)
@deprecated. Please use the ‘printComments’ property instead. Represents the way comments are printed with the sheet.
setPrintComments(value: PrintCommentsType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PrintCommentsType | The value to set. |
getPrintErrors()
@deprecated. Please use the ‘printErrors’ property instead. Specifies the type of print error displayed.
getPrintErrors() : PrintErrorsType;
Returns
setPrintErrors(PrintErrorsType)
@deprecated. Please use the ‘printErrors’ property instead. Specifies the type of print error displayed.
setPrintErrors(value: PrintErrorsType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PrintErrorsType | The value to set. |
getPrintHeadings()
@deprecated. Please use the ‘printHeadings’ property instead. Represents if row and column headings are printed with this page.
getPrintHeadings() : boolean;
setPrintHeadings(boolean)
@deprecated. Please use the ‘printHeadings’ property instead. Represents if row and column headings are printed with this page.
setPrintHeadings(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getPrintGridlines()
@deprecated. Please use the ‘printGridlines’ property instead. Represents if cell gridlines are printed on the page.
getPrintGridlines() : boolean;
setPrintGridlines(boolean)
@deprecated. Please use the ‘printGridlines’ property instead. Represents if cell gridlines are printed on the page.
setPrintGridlines(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getZoom()
@deprecated. Please use the ‘zoom’ property instead. Represents the scaling factor in percent. It should be between 10 and 400.
getZoom() : number;
setZoom(number)
@deprecated. Please use the ‘zoom’ property instead. Represents the scaling factor in percent. It should be between 10 and 400.
setZoom(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
isAutoFirstPageNumber()
@deprecated. Please use the ‘isAutoFirstPageNumber’ property instead. Indicates whether the first the page number is automatically assigned.
isAutoFirstPageNumber() : boolean;
setIsAutoFirstPageNumber(boolean)
@deprecated. Please use the ‘isAutoFirstPageNumber’ property instead. Indicates whether the first the page number is automatically assigned.
setIsAutoFirstPageNumber(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getPrintQuality()
@deprecated. Please use the ‘printQuality’ property instead. Represents the print quality.
getPrintQuality() : number;
setPrintQuality(number)
@deprecated. Please use the ‘printQuality’ property instead. Represents the print quality.
setPrintQuality(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getPrintCopies()
@deprecated. Please use the ‘printCopies’ property instead. Get and sets number of copies to print.
getPrintCopies() : number;
setPrintCopies(number)
@deprecated. Please use the ‘printCopies’ property instead. Get and sets number of copies to print.
setPrintCopies(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
isHFDiffOddEven()
@deprecated. Please use the ‘isHFDiffOddEven’ property instead. True means that the header/footer of the odd pages is different with odd pages.
isHFDiffOddEven() : boolean;
setIsHFDiffOddEven(boolean)
@deprecated. Please use the ‘isHFDiffOddEven’ property instead. True means that the header/footer of the odd pages is different with odd pages.
setIsHFDiffOddEven(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isHFDiffFirst()
@deprecated. Please use the ‘isHFDiffFirst’ property instead. True means that the header/footer of the first page is different with other pages.
isHFDiffFirst() : boolean;
setIsHFDiffFirst(boolean)
@deprecated. Please use the ‘isHFDiffFirst’ property instead. True means that the header/footer of the first page is different with other pages.
setIsHFDiffFirst(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isHFScaleWithDoc()
@deprecated. Please use the ‘isHFScaleWithDoc’ property instead. Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.
isHFScaleWithDoc() : boolean;
setIsHFScaleWithDoc(boolean)
@deprecated. Please use the ‘isHFScaleWithDoc’ property instead. Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.
setIsHFScaleWithDoc(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isHFAlignMargins()
@deprecated. Please use the ‘isHFAlignMargins’ property instead. Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default.
isHFAlignMargins() : boolean;
setIsHFAlignMargins(boolean)
@deprecated. Please use the ‘isHFAlignMargins’ property instead. Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default.
setIsHFAlignMargins(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
copy(PageSetup, CopyOptions)
Copies the setting of the page setup.
copy(source: PageSetup, copyOptions: CopyOptions) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
source | PageSetup | The source. |
copyOptions | CopyOptions | The copy options. |
setFitToPages(number, number)
Sets the number of pages the worksheet will be scaled to when it’s printed.
setFitToPages(wide: number, tall: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
wide | number | Pages wide. |
tall | number | Pages tall. |
customPaperSize(number, number)
Sets the custom paper size, in unit of inches.
customPaperSize(width: number, height: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
width | number | The width of the paper. |
height | number | The height of the paper. |
clearHeaderFooter()
Clears header and footer setting.
clearHeaderFooter() : void;
getHeader(number)
Gets a script formatting the header of an Excel file.
getHeader(section: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
getCommands(string)
Gets all commands of header or footer.
getCommands(headerFooterScript: string) : HeaderFooterCommand[];
Parameters:
Parameter | Type | Description |
---|---|---|
headerFooterScript | string | The header/footer script |
Returns
Returns all commands of header or footer.
getFooter(number)
Gets a script formatting the footer of an Excel file.
getFooter(section: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
setHeader(number, string)
Sets a script formatting the header of an Excel file.
setHeader(section: number, headerScript: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
headerScript | string | Header format script. |
Remarks
Script commands:
&P Current page number &N Page count &D Current date &T Current time &A Sheet name &F File name without path &"<FontName>" Font name, for example: &“Arial” &"<FontName>, <FontStyle>" Font name and font style, for example: &“Arial,Bold” &<FontSize> Font size. If this command is followed by a plain number to be printed in the header, it will be separated from the font height with a space character. &K<RRGGBB> Font color, for example(RED): &KFF0000 &G Image script
setFooter(number, string)
Sets a script formatting the footer of an Excel file.
setFooter(section: number, footerScript: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
footerScript | string | Footer format script. |
Remarks
Script commands:
&P Current page number &N Page count &D Current date &T Current time &A Sheet name &F File name without path &"<FontName>" Font name, for example: &“Arial” &"<FontName>, <FontStyle>" Font name and font style, for example: &“Arial,Bold” &<FontSize> Font size. If this command is followed by a plain number to be printed in the header, it will be separated from the font height with a space character. &K<RRGGBB> Font color, for example(RED): &KFF0000 &G Image script
setEvenHeader(number, string)
Sets a script formatting the even page header of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true.
setEvenHeader(section: number, headerScript: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
headerScript | string | Header format script. |
getEvenHeader(number)
Gets a script formatting the even header of an Excel file.
getEvenHeader(section: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
setEvenFooter(number, string)
Sets a script formatting the even page footer of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true.
setEvenFooter(section: number, footerScript: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
footerScript | string | Footer format script. |
getEvenFooter(number)
Gets a script formatting the even footer of an Excel file.
getEvenFooter(section: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
setFirstPageHeader(number, string)
Sets a script formatting the first page header of an Excel file. Only effect in Excel 2007 when IsHFDiffFirst is true.
setFirstPageHeader(section: number, headerScript: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
headerScript | string | Header format script. |
getFirstPageHeader(number)
Gets a script formatting the first page header of an Excel file.
getFirstPageHeader(section: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
setFirstPageFooter(number, string)
Sets a script formatting the first page footer of an Excel file.
setFirstPageFooter(section: number, footerScript: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
footerScript | string | Footer format script. |
getFirstPageFooter(number)
Gets a script formatting the first page footer of an Excel file.
getFirstPageFooter(section: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
setHeaderPicture(number, Uint8Array)
Sets an image in the header of a worksheet.
setHeaderPicture(section: number, headerPicture: Uint8Array) : Picture;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
headerPicture | number[] | Image data. |
Returns
Returns Picture object.
setFooterPicture(number, Uint8Array)
Sets an image in the footer of a worksheet.
setFooterPicture(section: number, footerPicture: Uint8Array) : Picture;
Parameters:
Parameter | Type | Description |
---|---|---|
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
footerPicture | number[] | Image data. |
Returns
Returns Picture object.
setPicture(boolean, boolean, boolean, number, Uint8Array)
Sets an image in the header/footer of a worksheet.
setPicture(isFirst: boolean, isEven: boolean, isHeader: boolean, section: number, imageData: Uint8Array) : Picture;
Parameters:
Parameter | Type | Description |
---|---|---|
isFirst | boolean | Indicates whether setting the picture of first page header/footer. |
isEven | boolean | Indicates whether setting the picture of even page header/footer. |
isHeader | boolean | Indicates whether setting the picture of header/footer. |
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
imageData | number[] | Image data. |
Returns
Returns Picture object.
getPicture(boolean, number)
Gets the Picture object of the header / footer.
getPicture(isHeader: boolean, section: number) : Picture;
Parameters:
Parameter | Type | Description |
---|---|---|
isHeader | boolean | Indicates whether it is in the header or footer. |
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
Returns
Returns Picture object. Returns null if there is no picture.
getPicture(boolean, boolean, boolean, number)
Gets the Picture object of the header / footer.
getPicture(isFirst: boolean, isEven: boolean, isHeader: boolean, section: number) : Picture;
Parameters:
Parameter | Type | Description |
---|---|---|
isFirst | boolean | Indicates whether getting the picture of first page header/footer. |
isEven | boolean | Indicates whether getting the picture of even page header/footer. |
isHeader | boolean | Indicates whether getting the picture of header/footer. |
section | number | 0: Left Section, 1: Center Section, 2: Right Section. |
Returns
Returns Picture object.
isNull()
Checks whether the implementation object is null.
isNull() : boolean;