com.aspose.cells
Class PageSetup

java.lang.Object
    extended by com.aspose.cells.PageSetup

public class PageSetup 
extends java.lang.Object

Encapsulates the object that represents the page setup description. The PageSetup object contains all page setup options.

Example:

Workbook workbook = new Workbook();

WorksheetCollection sheets = workbook.getWorksheets();

//Add a worksheet
sheets.add();
Worksheet sheet = sheets.get(1);
PageSetup pageSetup = sheet.getPageSetup();
pageSetup.setPrintArea("D1:K13");

//do your business


Property Getters/Setters Summary
booleangetBlackAndWhite()
voidsetBlackAndWhite(boolean)
           Represents if elements of the document will be printed in black and white.
doublegetBottomMargin()
voidsetBottomMargin(double)
           Represents the size of the bottom margin, in unit of centimeters.
doublegetBottomMarginInch()
voidsetBottomMarginInch(double)
           Represents the size of the bottom margin, in unit of inches.
booleangetCenterHorizontally()
voidsetCenterHorizontally(boolean)
           Represent if the sheet is printed centered horizontally.
booleangetCenterVertically()
voidsetCenterVertically(boolean)
           Represent if the sheet is printed centered vertically.
intgetFirstPageNumber()
voidsetFirstPageNumber(int)
           Represents the first page number that will be used when this sheet is printed.
intgetFitToPagesTall()
voidsetFitToPagesTall(int)
           Represents the number of pages tall the worksheet will be scaled to when it's printed. The default value is 1.
intgetFitToPagesWide()
voidsetFitToPagesWide(int)
           Represents the number of pages wide the worksheet will be scaled to when it's printed. The default value is 1.
doublegetFooterMargin()
voidsetFooterMargin(double)
           Represents the distance from the bottom of the page to the footer, in unit of centimeters.
doublegetFooterMarginInch()
voidsetFooterMarginInch(double)
           Represents the distance from the bottom of the page to the footer, in unit of inches.
doublegetHeaderMargin()
voidsetHeaderMargin(double)
           Represents the distance from the top of the page to the header, in unit of centimeters.
doublegetHeaderMarginInch()
voidsetHeaderMarginInch(double)
           Represents the distance from the top of the page to the header, in unit of inches.
booleanisAutoFirstPageNumber()
voidsetAutoFirstPageNumber(boolean)
           Indicates whether the first the page number is automatically assigned.
booleanisAutomaticPaperSize()
           Indicates whether the paper size is automatic.
booleanisHFAlignMargins()
voidsetHFAlignMargins(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.
booleanisHFDiffFirst()
voidsetHFDiffFirst(boolean)
           True means that the header/footer of the first page is different with other pages.
booleanisHFDiffOddEven()
voidsetHFDiffOddEven(boolean)
           True means that the header/footer of the odd pages is different with odd pages.
booleanisHFScaleWithDoc()
voidsetHFScaleWithDoc(boolean)
           Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.
booleanisPercentScale()
voidsetPercentScale(boolean)
           If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
doublegetLeftMargin()
voidsetLeftMargin(double)
           Represents the size of the left margin, in unit of centimeters.
doublegetLeftMarginInch()
voidsetLeftMarginInch(double)
           Represents the size of the left margin, in unit of inches.
OdsPageBackgroundgetODSPageBackground()
           Gets the background of ODS.
intgetOrder()
voidsetOrder(int)
           Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. The value of the property is PrintOrderType integer constant.
intgetOrientation()
voidsetOrientation(int)
           Represents page print orientation. The value of the property is PageOrientationType integer constant.
doublegetPaperHeight()
           Gets the height of the paper in unit of inches , considered page orientation.
intgetPaperSize()
voidsetPaperSize(int)
           Represents the size of the paper. The value of the property is PaperSizeType integer constant.
doublegetPaperWidth()
           Gets the width of the paper in unit of inches, considered page orientation.
java.lang.StringgetPrintArea()
voidsetPrintArea(java.lang.String)
           Represents the range to be printed.
intgetPrintComments()
voidsetPrintComments(int)
           Represents the way comments are printed with the sheet. The value of the property is PrintCommentsType integer constant.
intgetPrintCopies()
voidsetPrintCopies(int)
           Get and sets number of copies to print.
booleangetPrintDraft()
voidsetPrintDraft(boolean)
           Represents if the sheet will be printed without graphics.
intgetPrintErrors()
voidsetPrintErrors(int)
           Specifies the type of print error displayed. The value of the property is PrintErrorsType integer constant.
byte[]getPrinterSettings()
voidsetPrinterSettings(byte[])
           Gets and sets the settings of the default printer.
booleangetPrintGridlines()
voidsetPrintGridlines(boolean)
           Represents if cell gridlines are printed on the page.
booleangetPrintHeadings()
voidsetPrintHeadings(boolean)
           Represents if row and column headings are printed with this page.
intgetPrintQuality()
voidsetPrintQuality(int)
           Represents the print quality.
java.lang.StringgetPrintTitleColumns()
voidsetPrintTitleColumns(java.lang.String)
           Represents the columns that contain the cells to be repeated on the left side of each page.
java.lang.StringgetPrintTitleRows()
voidsetPrintTitleRows(java.lang.String)
           Represents the rows that contain the cells to be repeated at the top of each page.
doublegetRightMargin()
voidsetRightMargin(double)
           Represents the size of the right margin, in unit of centimeters.
doublegetRightMarginInch()
voidsetRightMarginInch(double)
           Represents the size of the right margin, in unit of inches.
doublegetTopMargin()
voidsetTopMargin(double)
           Represents the size of the top margin, in unit of centimeters.
doublegetTopMarginInch()
voidsetTopMarginInch(double)
           Represents the size of the top margin, in unit of inches.
intgetZoom()
voidsetZoom(int)
           Represents the scaling factor in percent. It should be between 10 and 400.
 
Method Summary
voidclearHeaderFooter()
           Clears header and footer setting.
voidcopy(PageSetup source, CopyOptions copyOptions)
           Copies the setting of the page setup.
voidcustomPaperSize(double width, double height)
           Sets the custom paper size, in unit of inches.
com.aspose.cells.HeaderFooterCommand[]getCommands(java.lang.String headerFooterScript)
           Gets all commands of header or footer.
java.lang.StringgetEvenFooter(int section)
           Gets a script formatting the even footer of an Excel file.
java.lang.StringgetEvenHeader(int section)
           Gets a script formatting the even header of an Excel file.
java.lang.StringgetFirstPageFooter(int section)
           Gets a script formatting the first page footer of an Excel file.
java.lang.StringgetFirstPageHeader(int section)
           Gets a script formatting the first page header of an Excel file.
java.lang.StringgetFooter(int section)
           Gets a script formatting the footer of an Excel file.
java.lang.StringgetHeader(int section)
           Gets a script formatting the header of an Excel file.
PicturegetPicture(boolean isFirst, boolean isEven, boolean isHeader, int section)
           Gets the Picture object of the header / footer.
PicturegetPicture(boolean isHeader, int section)
           Gets the Picture object of the header / footer.
voidsetEvenFooter(int section, java.lang.String footerScript)
           Sets a script formatting the even page footer of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true.
voidsetEvenHeader(int section, java.lang.String headerScript)
           Sets a script formatting the even page header of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true.
voidsetFirstPageFooter(int section, java.lang.String footerScript)
           Sets a script formatting the first page footer of an Excel file.
voidsetFirstPageHeader(int section, java.lang.String headerScript)
           Sets a script formatting the first page header of an Excel file. Only effect in Excel 2007 when IsHFDiffFirst is true.
voidsetFitToPages(int wide, int tall)
           Sets the number of pages the worksheet will be scaled to when it's printed.
voidsetFooter(int section, java.lang.String footerScript)
           Sets a script formatting the footer of an Excel file.
PicturesetFooterPicture(int section, byte[] footerPicture)
           Sets an image in the footer of a worksheet.
voidsetHeader(int section, java.lang.String headerScript)
           Sets a script formatting the header of an Excel file.
PicturesetHeaderPicture(int section, byte[] headerPicture)
           Sets an image in the header of a worksheet.
PicturesetPicture(boolean isFirst, boolean isEven, boolean isHeader, int section, byte[] imageData)
           Sets an image in the header/footer of a worksheet.
 

Property Getters/Setters Detail

getODSPageBackground

public OdsPageBackground getODSPageBackground()
Gets the background of ODS.

getPrintArea/setPrintArea

public java.lang.String getPrintArea() / public void setPrintArea(java.lang.String value)
Represents the range to be printed.

setPrintArea

public void setPrintArea(java.lang.String value)
Represents the range to be printed.

getPrintTitleColumns/setPrintTitleColumns

public java.lang.String getPrintTitleColumns() / public void setPrintTitleColumns(java.lang.String value)
Represents the columns that contain the cells to be repeated on the left side of each page.

Example:

pageSetup.setPrintTitleColumns("$A:$A");

setPrintTitleColumns

public void setPrintTitleColumns(java.lang.String value)
Represents the columns that contain the cells to be repeated on the left side of each page.

Example:

pageSetup.setPrintTitleColumns("$A:$A");

getPrintTitleRows/setPrintTitleRows

public java.lang.String getPrintTitleRows() / public void setPrintTitleRows(java.lang.String value)
Represents the rows that contain the cells to be repeated at the top of each page.

Example:

pageSetup.setPrintTitleRows("$1:$1");

setPrintTitleRows

public void setPrintTitleRows(java.lang.String value)
Represents the rows that contain the cells to be repeated at the top of each page.

Example:

pageSetup.setPrintTitleRows("$1:$1");

getBlackAndWhite/setBlackAndWhite

public boolean getBlackAndWhite() / public void setBlackAndWhite(boolean value)
Represents if elements of the document will be printed in black and white.

setBlackAndWhite

public void setBlackAndWhite(boolean value)
Represents if elements of the document will be printed in black and white.

getCenterHorizontally/setCenterHorizontally

public boolean getCenterHorizontally() / public void setCenterHorizontally(boolean value)
Represent if the sheet is printed centered horizontally.

setCenterHorizontally

public void setCenterHorizontally(boolean value)
Represent if the sheet is printed centered horizontally.

getCenterVertically/setCenterVertically

public boolean getCenterVertically() / public void setCenterVertically(boolean value)
Represent if the sheet is printed centered vertically.

setCenterVertically

public void setCenterVertically(boolean value)
Represent if the sheet is printed centered vertically.

getPrintDraft/setPrintDraft

public boolean getPrintDraft() / public void setPrintDraft(boolean value)
Represents if the sheet will be printed without graphics.

setPrintDraft

public void setPrintDraft(boolean value)
Represents if the sheet will be printed without graphics.

getFooterMargin/setFooterMargin

public double getFooterMargin() / public void setFooterMargin(double value)
Represents the distance from the bottom of the page to the footer, in unit of centimeters.

setFooterMargin

public void setFooterMargin(double value)
Represents the distance from the bottom of the page to the footer, in unit of centimeters.

getFooterMarginInch/setFooterMarginInch

public double getFooterMarginInch() / public void setFooterMarginInch(double value)
Represents the distance from the bottom of the page to the footer, in unit of inches.

setFooterMarginInch

public void setFooterMarginInch(double value)
Represents the distance from the bottom of the page to the footer, in unit of inches.

getHeaderMargin/setHeaderMargin

public double getHeaderMargin() / public void setHeaderMargin(double value)
Represents the distance from the top of the page to the header, in unit of centimeters.

setHeaderMargin

public void setHeaderMargin(double value)
Represents the distance from the top of the page to the header, in unit of centimeters.

getHeaderMarginInch/setHeaderMarginInch

public double getHeaderMarginInch() / public void setHeaderMarginInch(double value)
Represents the distance from the top of the page to the header, in unit of inches.

setHeaderMarginInch

public void setHeaderMarginInch(double value)
Represents the distance from the top of the page to the header, in unit of inches.

getPrinterSettings/setPrinterSettings

public byte[] getPrinterSettings() / public void setPrinterSettings(byte[] value)
Gets and sets the settings of the default printer.

setPrinterSettings

public void setPrinterSettings(byte[] value)
Gets and sets the settings of the default printer.

getLeftMargin/setLeftMargin

public double getLeftMargin() / public void setLeftMargin(double value)
Represents the size of the left margin, in unit of centimeters.

setLeftMargin

public void setLeftMargin(double value)
Represents the size of the left margin, in unit of centimeters.

getLeftMarginInch/setLeftMarginInch

public double getLeftMarginInch() / public void setLeftMarginInch(double value)
Represents the size of the left margin, in unit of inches.

setLeftMarginInch

public void setLeftMarginInch(double value)
Represents the size of the left margin, in unit of inches.

getRightMargin/setRightMargin

public double getRightMargin() / public void setRightMargin(double value)
Represents the size of the right margin, in unit of centimeters.

setRightMargin

public void setRightMargin(double value)
Represents the size of the right margin, in unit of centimeters.

getRightMarginInch/setRightMarginInch

public double getRightMarginInch() / public void setRightMarginInch(double value)
Represents the size of the right margin, in unit of inches.

setRightMarginInch

public void setRightMarginInch(double value)
Represents the size of the right margin, in unit of inches.

getTopMargin/setTopMargin

public double getTopMargin() / public void setTopMargin(double value)
Represents the size of the top margin, in unit of centimeters.

setTopMargin

public void setTopMargin(double value)
Represents the size of the top margin, in unit of centimeters.

getTopMarginInch/setTopMarginInch

public double getTopMarginInch() / public void setTopMarginInch(double value)
Represents the size of the top margin, in unit of inches.

setTopMarginInch

public void setTopMarginInch(double value)
Represents the size of the top margin, in unit of inches.

getBottomMargin/setBottomMargin

public double getBottomMargin() / public void setBottomMargin(double value)
Represents the size of the bottom margin, in unit of centimeters.

setBottomMargin

public void setBottomMargin(double value)
Represents the size of the bottom margin, in unit of centimeters.

getBottomMarginInch/setBottomMarginInch

public double getBottomMarginInch() / public void setBottomMarginInch(double value)
Represents the size of the bottom margin, in unit of inches.

setBottomMarginInch

public void setBottomMarginInch(double value)
Represents the size of the bottom margin, in unit of inches.

getFirstPageNumber/setFirstPageNumber

public int getFirstPageNumber() / public void setFirstPageNumber(int value)
Represents the first page number that will be used when this sheet is printed.

setFirstPageNumber

public void setFirstPageNumber(int value)
Represents the first page number that will be used when this sheet is printed.

getFitToPagesTall/setFitToPagesTall

public int getFitToPagesTall() / public void setFitToPagesTall(int value)
Represents the number of pages tall the worksheet will be scaled to when it's printed. The default value is 1. You have to set FitToPagesWide as zero if you want to fit all rows on one page.

setFitToPagesTall

public void setFitToPagesTall(int value)
Represents the number of pages tall the worksheet will be scaled to when it's printed. The default value is 1. You have to set FitToPagesWide as zero if you want to fit all rows on one page.

getFitToPagesWide/setFitToPagesWide

public int getFitToPagesWide() / public void setFitToPagesWide(int value)
Represents the number of pages wide the worksheet will be scaled to when it's printed. The default value is 1. You have to set FitToPagesTall as zero if you want to fit all columns on one page.

setFitToPagesWide

public void setFitToPagesWide(int value)
Represents the number of pages wide the worksheet will be scaled to when it's printed. The default value is 1. You have to set FitToPagesTall as zero if you want to fit all columns on one page.

isPercentScale/setPercentScale

public boolean isPercentScale() / public void setPercentScale(boolean value)
If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.

setPercentScale

public void setPercentScale(boolean value)
If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.

getOrder/setOrder

public int getOrder() / public void setOrder(int value)
Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. The value of the property is PrintOrderType integer constant.

setOrder

public void setOrder(int value)
Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. The value of the property is PrintOrderType integer constant.

isAutomaticPaperSize

public boolean isAutomaticPaperSize()
Indicates whether the paper size is automatic.

getPaperSize/setPaperSize

public int getPaperSize() / public void setPaperSize(int value)
Represents the size of the paper. The value of the property is PaperSizeType integer constant.

setPaperSize

public void setPaperSize(int value)
Represents the size of the paper. The value of the property is PaperSizeType integer constant.

getPaperWidth

public double getPaperWidth()
Gets the width of the paper in unit of inches, considered page orientation.

getPaperHeight

public double getPaperHeight()
Gets the height of the paper in unit of inches , considered page orientation.

getOrientation/setOrientation

public int getOrientation() / public void setOrientation(int value)
Represents page print orientation. The value of the property is PageOrientationType integer constant.

setOrientation

public void setOrientation(int value)
Represents page print orientation. The value of the property is PageOrientationType integer constant.

getPrintComments/setPrintComments

public int getPrintComments() / public void setPrintComments(int value)
Represents the way comments are printed with the sheet. The value of the property is PrintCommentsType integer constant.

setPrintComments

public void setPrintComments(int value)
Represents the way comments are printed with the sheet. The value of the property is PrintCommentsType integer constant.

getPrintErrors/setPrintErrors

public int getPrintErrors() / public void setPrintErrors(int value)
Specifies the type of print error displayed. The value of the property is PrintErrorsType integer constant.

setPrintErrors

public void setPrintErrors(int value)
Specifies the type of print error displayed. The value of the property is PrintErrorsType integer constant.

getPrintHeadings/setPrintHeadings

public boolean getPrintHeadings() / public void setPrintHeadings(boolean value)
Represents if row and column headings are printed with this page.

setPrintHeadings

public void setPrintHeadings(boolean value)
Represents if row and column headings are printed with this page.

getPrintGridlines/setPrintGridlines

public boolean getPrintGridlines() / public void setPrintGridlines(boolean value)
Represents if cell gridlines are printed on the page.

setPrintGridlines

public void setPrintGridlines(boolean value)
Represents if cell gridlines are printed on the page.

getZoom/setZoom

public int getZoom() / public void setZoom(int value)
Represents the scaling factor in percent. It should be between 10 and 400.

setZoom

public void setZoom(int value)
Represents the scaling factor in percent. It should be between 10 and 400.

isAutoFirstPageNumber/setAutoFirstPageNumber

public boolean isAutoFirstPageNumber() / public void setAutoFirstPageNumber(boolean value)
Indicates whether the first the page number is automatically assigned.

setAutoFirstPageNumber

public void setAutoFirstPageNumber(boolean value)
Indicates whether the first the page number is automatically assigned.

getPrintQuality/setPrintQuality

public int getPrintQuality() / public void setPrintQuality(int value)
Represents the print quality.

setPrintQuality

public void setPrintQuality(int value)
Represents the print quality.

getPrintCopies/setPrintCopies

public int getPrintCopies() / public void setPrintCopies(int value)
Get and sets number of copies to print.

setPrintCopies

public void setPrintCopies(int value)
Get and sets number of copies to print.

isHFDiffOddEven/setHFDiffOddEven

public boolean isHFDiffOddEven() / public void setHFDiffOddEven(boolean value)
True means that the header/footer of the odd pages is different with odd pages.

setHFDiffOddEven

public void setHFDiffOddEven(boolean value)
True means that the header/footer of the odd pages is different with odd pages.

isHFDiffFirst/setHFDiffFirst

public boolean isHFDiffFirst() / public void setHFDiffFirst(boolean value)
True means that the header/footer of the first page is different with other pages.

setHFDiffFirst

public void setHFDiffFirst(boolean value)
True means that the header/footer of the first page is different with other pages.

isHFScaleWithDoc/setHFScaleWithDoc

public boolean isHFScaleWithDoc() / public void setHFScaleWithDoc(boolean value)
Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.

setHFScaleWithDoc

public void setHFScaleWithDoc(boolean value)
Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007.

isHFAlignMargins/setHFAlignMargins

public boolean isHFAlignMargins() / public void setHFAlignMargins(boolean value)
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.

setHFAlignMargins

public void setHFAlignMargins(boolean value)
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.

Method Detail

setHeaderPicture

public Picture setHeaderPicture(int section, byte[] headerPicture)
                        throws java.lang.Exception
Sets an image in the header of a worksheet.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
headerPicture - Image data.
Returns:
Returns Picture object.

setFooterPicture

public Picture setFooterPicture(int section, byte[] footerPicture)
                        throws java.lang.Exception
Sets an image in the footer of a worksheet.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
footerPicture - Image data.
Returns:
Returns Picture object.

setPicture

public Picture setPicture(boolean isFirst, boolean isEven, boolean isHeader, int section, byte[] imageData)
                  throws java.lang.Exception
Sets an image in the header/footer of a worksheet.
Parameters:
isFirst - Indicates whether setting the picture of first page header/footer.
isEven - Indicates whether setting the picture of even page header/footer.
isHeader - Indicates whether setting the picture of header/footer.
section - 0: Left Section, 1: Center Section, 2: Right Section.
imageData - Image data.
Returns:
Returns Picture object.

getPicture

public Picture getPicture(boolean isHeader, int section)
Gets the Picture object of the header / footer.
Parameters:
isHeader - Indicates whether it is in the header or footer.
section - 0: Left Section, 1: Center Section, 2: Right Section.
Returns:
Returns Picture object. Returns null if there is no picture.

getPicture

public Picture getPicture(boolean isFirst, boolean isEven, boolean isHeader, int section)
Gets the Picture object of the header / footer.
Parameters:
isFirst - Indicates whether getting the picture of first page header/footer.
isEven - Indicates whether getting the picture of even page header/footer.
isHeader - Indicates whether getting the picture of header/footer.
section - 0: Left Section, 1: Center Section, 2: Right Section.
Returns:
Returns Picture object.

copy

public void copy(PageSetup source, CopyOptions copyOptions)
         throws java.lang.Exception
Copies the setting of the page setup.
Parameters:
source - The source.
copyOptions - The copy options.

setFitToPages

public void setFitToPages(int wide, int tall)
Sets the number of pages the worksheet will be scaled to when it's printed.
Parameters:
wide - Pages wide.
tall - Pages tall.

customPaperSize

public void customPaperSize(double width, double height)
Sets the custom paper size, in unit of inches.
Parameters:
width - The width of the paper.
height - The height of the paper.

clearHeaderFooter

public void clearHeaderFooter()
Clears header and footer setting.

getHeader

public java.lang.String getHeader(int section)
Gets a script formatting the header of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.

getCommands

public com.aspose.cells.HeaderFooterCommand[] getCommands(java.lang.String headerFooterScript)
Gets all commands of header or footer.
Parameters:
headerFooterScript - The header/footer script
Returns:
Returns all commands of header or footer.

getFooter

public java.lang.String getFooter(int section)
Gets a script formatting the footer of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.

setHeader

public void setHeader(int section, java.lang.String headerScript)
Sets a script formatting the header of an Excel file.

Script commands:

CommandDescription
&PCurrent page number 
&NPage count 
&DCurrent date 
&TCurrent time
&ASheet name
&FFile 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
&GImage script
For example: "&Arial,Bold&8Header Note"
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
headerScript - Header format script.

setFooter

public void setFooter(int section, java.lang.String footerScript)
Sets a script formatting the footer of an Excel file.

Script commands:

CommandDescription
&PCurrent page number 
&NPage count 
&DCurrent date 
&TCurrent time
&ASheet name
&FFile 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
&GImage script
For example: "&Arial,Bold&8Footer Note"
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
footerScript - Footer format script.

setEvenHeader

public void setEvenHeader(int section, java.lang.String headerScript)
Sets a script formatting the even page header of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
headerScript - Header format script.

getEvenHeader

public java.lang.String getEvenHeader(int section)
Gets a script formatting the even header of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.

setEvenFooter

public void setEvenFooter(int section, java.lang.String footerScript)
Sets a script formatting the even page footer of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
footerScript - Footer format script.

getEvenFooter

public java.lang.String getEvenFooter(int section)
Gets a script formatting the even footer of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.

setFirstPageHeader

public void setFirstPageHeader(int section, java.lang.String headerScript)
Sets a script formatting the first page header of an Excel file. Only effect in Excel 2007 when IsHFDiffFirst is true.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
headerScript - Header format script.

getFirstPageHeader

public java.lang.String getFirstPageHeader(int section)
Gets a script formatting the first page header of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.

setFirstPageFooter

public void setFirstPageFooter(int section, java.lang.String footerScript)
Sets a script formatting the first page footer of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.
footerScript - Footer format script.

getFirstPageFooter

public java.lang.String getFirstPageFooter(int section)
Gets a script formatting the first page footer of an Excel file.
Parameters:
section - 0: Left Section, 1: Center Section, 2: Right Section.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.