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.getWorksheets().get(0);
sheet.getPageSetup().setPrintArea("D1:K13");
sheet.getPageSetup().setPrintTitleRows("$5:$7");
sheet.getPageSetup().setPrintTitleColumns("$A:$B");
Methods
Method | Description |
---|---|
getODSPageBackground() | Gets the background of ODS. |
getPrintArea() | Represents the range to be printed. |
setPrintArea(string) | Represents the range to be printed. |
getPrintTitleColumns() | Represents the columns that contain the cells to be repeated on the left side of each page. |
setPrintTitleColumns(string) | Represents the columns that contain the cells to be repeated on the left side of each page. |
getPrintTitleRows() | Represents the rows that contain the cells to be repeated at the top of each page. |
setPrintTitleRows(string) | Represents the rows that contain the cells to be repeated at the top of each page. |
getBlackAndWhite() | Represents if elements of the document will be printed in black and white. |
setBlackAndWhite(boolean) | Represents if elements of the document will be printed in black and white. |
getCenterHorizontally() | Represent if the sheet is printed centered horizontally. |
setCenterHorizontally(boolean) | Represent if the sheet is printed centered horizontally. |
getCenterVertically() | Represent if the sheet is printed centered vertically. |
setCenterVertically(boolean) | Represent if the sheet is printed centered vertically. |
getPrintDraft() | Represents if the sheet will be printed without graphics. |
setPrintDraft(boolean) | Represents if the sheet will be printed without graphics. |
getFooterMargin() | Represents the distance from the bottom of the page to the footer, in unit of centimeters. |
setFooterMargin(number) | Represents the distance from the bottom of the page to the footer, in unit of centimeters. |
getFooterMarginInch() | Represents the distance from the bottom of the page to the footer, in unit of inches. |
setFooterMarginInch(number) | Represents the distance from the bottom of the page to the footer, in unit of inches. |
getHeaderMargin() | Represents the distance from the top of the page to the header, in unit of centimeters. |
setHeaderMargin(number) | Represents the distance from the top of the page to the header, in unit of centimeters. |
getHeaderMarginInch() | Represents the distance from the top of the page to the header, in unit of inches. |
setHeaderMarginInch(number) | Represents the distance from the top of the page to the header, in unit of inches. |
getPrinterSettings() | Gets and sets the settings of the default printer. |
setPrinterSettings(number[]) | Gets and sets the settings of the default printer. |
getLeftMargin() | Represents the size of the left margin, in unit of centimeters. |
setLeftMargin(number) | Represents the size of the left margin, in unit of centimeters. |
getLeftMarginInch() | Represents the size of the left margin, in unit of inches. |
setLeftMarginInch(number) | Represents the size of the left margin, in unit of inches. |
getRightMargin() | Represents the size of the right margin, in unit of centimeters. |
setRightMargin(number) | Represents the size of the right margin, in unit of centimeters. |
getRightMarginInch() | Represents the size of the right margin, in unit of inches. |
setRightMarginInch(number) | Represents the size of the right margin, in unit of inches. |
getTopMargin() | Represents the size of the top margin, in unit of centimeters. |
setTopMargin(number) | Represents the size of the top margin, in unit of centimeters. |
getTopMarginInch() | Represents the size of the top margin, in unit of inches. |
setTopMarginInch(number) | Represents the size of the top margin, in unit of inches. |
getBottomMargin() | Represents the size of the bottom margin, in unit of centimeters. |
setBottomMargin(number) | Represents the size of the bottom margin, in unit of centimeters. |
getBottomMarginInch() | Represents the size of the bottom margin, in unit of inches. |
setBottomMarginInch(number) | Represents the size of the bottom margin, in unit of inches. |
getFirstPageNumber() | Represents the first page number that will be used when this sheet is printed. |
setFirstPageNumber(number) | Represents the first page number that will be used when this sheet is printed. |
getFitToPagesTall() | Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1. |
setFitToPagesTall(number) | Represents the number of pages tall the worksheet will be scaled to when it’s printed. The default value is 1. |
getFitToPagesWide() | Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1. |
setFitToPagesWide(number) | Represents the number of pages wide the worksheet will be scaled to when it’s printed. The default value is 1. |
isPercentScale() | If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. |
setIsPercentScale(boolean) | If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. |
getOrder() | Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. |
setOrder(PrintOrderType) | Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. |
isAutomaticPaperSize() | Indicates whether the paper size is automatic. |
getPaperSize() | Represents the size of the paper. |
setPaperSize(PaperSizeType) | Represents the size of the paper. |
getPaperWidth() | Gets the width of the paper in unit of inches, considered page orientation. |
getPaperHeight() | Gets the height of the paper in unit of inches , considered page orientation. |
getOrientation() | Represents page print orientation. |
setOrientation(PageOrientationType) | Represents page print orientation. |
getPrintComments() | Represents the way comments are printed with the sheet. |
setPrintComments(PrintCommentsType) | Represents the way comments are printed with the sheet. |
getPrintErrors() | Specifies the type of print error displayed. |
setPrintErrors(PrintErrorsType) | Specifies the type of print error displayed. |
getPrintHeadings() | Represents if row and column headings are printed with this page. |
setPrintHeadings(boolean) | Represents if row and column headings are printed with this page. |
getPrintGridlines() | Represents if cell gridlines are printed on the page. |
setPrintGridlines(boolean) | Represents if cell gridlines are printed on the page. |
getZoom() | Represents the scaling factor in percent. It should be between 10 and 400. |
setZoom(number) | Represents the scaling factor in percent. It should be between 10 and 400. |
isAutoFirstPageNumber() | Indicates whether the first the page number is automatically assigned. |
setIsAutoFirstPageNumber(boolean) | Indicates whether the first the page number is automatically assigned. |
getPrintQuality() | Represents the print quality. |
setPrintQuality(number) | Represents the print quality. |
getPrintCopies() | Get and sets number of copies to print. |
setPrintCopies(number) | Get and sets number of copies to print. |
isHFDiffOddEven() | True means that the header/footer of the odd pages is different with odd pages. |
setIsHFDiffOddEven(boolean) | True means that the header/footer of the odd pages is different with odd pages. |
isHFDiffFirst() | True means that the header/footer of the first page is different with other pages. |
setIsHFDiffFirst(boolean) | True means that the header/footer of the first page is different with other pages. |
isHFScaleWithDoc() | Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007. |
setIsHFScaleWithDoc(boolean) | Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007. |
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. |
setIsHFAlignMargins(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. |
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, number[]) | Sets an image in the header of a worksheet. |
setFooterPicture(number, number[]) | Sets an image in the footer of a worksheet. |
setPicture(boolean, boolean, boolean, number, number[]) | 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. |
getODSPageBackground()
Gets the background of ODS.
getODSPageBackground() : OdsPageBackground;
Returns
getPrintArea()
Represents the range to be printed.
getPrintArea() : string;
setPrintArea(string)
Represents the range to be printed.
setPrintArea(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getPrintTitleColumns()
Represents the columns that contain the cells to be repeated on the left side of each page.
getPrintTitleColumns() : string;
setPrintTitleColumns(string)
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()
Represents the rows that contain the cells to be repeated at the top of each page.
getPrintTitleRows() : string;
setPrintTitleRows(string)
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()
Represents if elements of the document will be printed in black and white.
getBlackAndWhite() : boolean;
setBlackAndWhite(boolean)
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()
Represent if the sheet is printed centered horizontally.
getCenterHorizontally() : boolean;
setCenterHorizontally(boolean)
Represent if the sheet is printed centered horizontally.
setCenterHorizontally(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getCenterVertically()
Represent if the sheet is printed centered vertically.
getCenterVertically() : boolean;
setCenterVertically(boolean)
Represent if the sheet is printed centered vertically.
setCenterVertically(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getPrintDraft()
Represents if the sheet will be printed without graphics.
getPrintDraft() : boolean;
setPrintDraft(boolean)
Represents if the sheet will be printed without graphics.
setPrintDraft(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getFooterMargin()
Represents the distance from the bottom of the page to the footer, in unit of centimeters.
getFooterMargin() : number;
setFooterMargin(number)
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()
Represents the distance from the bottom of the page to the footer, in unit of inches.
getFooterMarginInch() : number;
setFooterMarginInch(number)
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()
Represents the distance from the top of the page to the header, in unit of centimeters.
getHeaderMargin() : number;
setHeaderMargin(number)
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()
Represents the distance from the top of the page to the header, in unit of inches.
getHeaderMarginInch() : number;
setHeaderMarginInch(number)
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()
Gets and sets the settings of the default printer.
getPrinterSettings() : number[];
Returns
number[]
setPrinterSettings(number[])
Gets and sets the settings of the default printer.
setPrinterSettings(value: number[]) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number[] | The value to set. |
getLeftMargin()
Represents the size of the left margin, in unit of centimeters.
getLeftMargin() : number;
setLeftMargin(number)
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()
Represents the size of the left margin, in unit of inches.
getLeftMarginInch() : number;
setLeftMarginInch(number)
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()
Represents the size of the right margin, in unit of centimeters.
getRightMargin() : number;
setRightMargin(number)
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()
Represents the size of the right margin, in unit of inches.
getRightMarginInch() : number;
setRightMarginInch(number)
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()
Represents the size of the top margin, in unit of centimeters.
getTopMargin() : number;
setTopMargin(number)
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()
Represents the size of the top margin, in unit of inches.
getTopMarginInch() : number;
setTopMarginInch(number)
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()
Represents the size of the bottom margin, in unit of centimeters.
getBottomMargin() : number;
setBottomMargin(number)
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()
Represents the size of the bottom margin, in unit of inches.
getBottomMarginInch() : number;
setBottomMarginInch(number)
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()
Represents the first page number that will be used when this sheet is printed.
getFirstPageNumber() : number;
setFirstPageNumber(number)
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()
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)
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()
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)
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()
If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
isPercentScale() : boolean;
setIsPercentScale(boolean)
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()
Represents the order that Microsoft Excel uses to number pages when printing a large worksheet.
getOrder() : PrintOrderType;
Returns
setOrder(PrintOrderType)
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()
Indicates whether the paper size is automatic.
isAutomaticPaperSize() : boolean;
getPaperSize()
Represents the size of the paper.
getPaperSize() : PaperSizeType;
Returns
setPaperSize(PaperSizeType)
Represents the size of the paper.
setPaperSize(value: PaperSizeType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PaperSizeType | The value to set. |
getPaperWidth()
Gets the width of the paper in unit of inches, considered page orientation.
getPaperWidth() : number;
getPaperHeight()
Gets the height of the paper in unit of inches , considered page orientation.
getPaperHeight() : number;
getOrientation()
Represents page print orientation.
getOrientation() : PageOrientationType;
Returns
setOrientation(PageOrientationType)
Represents page print orientation.
setOrientation(value: PageOrientationType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PageOrientationType | The value to set. |
getPrintComments()
Represents the way comments are printed with the sheet.
getPrintComments() : PrintCommentsType;
Returns
setPrintComments(PrintCommentsType)
Represents the way comments are printed with the sheet.
setPrintComments(value: PrintCommentsType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PrintCommentsType | The value to set. |
getPrintErrors()
Specifies the type of print error displayed.
getPrintErrors() : PrintErrorsType;
Returns
setPrintErrors(PrintErrorsType)
Specifies the type of print error displayed.
setPrintErrors(value: PrintErrorsType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | PrintErrorsType | The value to set. |
getPrintHeadings()
Represents if row and column headings are printed with this page.
getPrintHeadings() : boolean;
setPrintHeadings(boolean)
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()
Represents if cell gridlines are printed on the page.
getPrintGridlines() : boolean;
setPrintGridlines(boolean)
Represents if cell gridlines are printed on the page.
setPrintGridlines(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getZoom()
Represents the scaling factor in percent. It should be between 10 and 400.
getZoom() : number;
setZoom(number)
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()
Indicates whether the first the page number is automatically assigned.
isAutoFirstPageNumber() : boolean;
setIsAutoFirstPageNumber(boolean)
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()
Represents the print quality.
getPrintQuality() : number;
setPrintQuality(number)
Represents the print quality.
setPrintQuality(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getPrintCopies()
Get and sets number of copies to print.
getPrintCopies() : number;
setPrintCopies(number)
Get and sets number of copies to print.
setPrintCopies(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
isHFDiffOddEven()
True means that the header/footer of the odd pages is different with odd pages.
isHFDiffOddEven() : boolean;
setIsHFDiffOddEven(boolean)
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()
True means that the header/footer of the first page is different with other pages.
isHFDiffFirst() : boolean;
setIsHFDiffFirst(boolean)
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()
Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.
isHFScaleWithDoc() : boolean;
setIsHFScaleWithDoc(boolean)
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()
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)
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, number[])
Sets an image in the header of a worksheet.
setHeaderPicture(section: number, headerPicture: number[]) : 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, number[])
Sets an image in the footer of a worksheet.
setFooterPicture(section: number, footerPicture: number[]) : 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, number[])
Sets an image in the header/footer of a worksheet.
setPicture(isFirst: boolean, isEven: boolean, isHeader: boolean, section: number, imageData: number[]) : 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;