com.aspose.cells
Classes 
AboveAverage
AbstractCalculationEngine
AbstractCalculationMonitor
AbstractGlobalizationSettings
AbstractInterruptMonitor
AbstractTextLoadOptions
ActiveXControl
ActiveXControlBase
ArcShape
Area
AutoFilter
AutoFitterOptions
AutomaticFill
AutoNumberedBulletValue
Axis
AxisBins
BaseShapeGuide
Bevel
Border
BorderCollection
BuiltInDocumentPropertyCollection
Bullet
BulletValue
Button
CalculationCell
CalculationData
CalculationOptions
Cell
CellArea
Cells
CellsColor
CellsDataTableFactory
CellsDrawing
CellsException
CellsFactory
CellsHelper
CellWatch
CellWatchCollection
CharacterBulletValue
Chart
ChartArea
ChartCollection
ChartDataTable
ChartFrame
ChartGlobalizationSettings
ChartPoint
ChartPointCollection
ChartShape
ChartTextFrame
CheckBox
CheckBoxActiveXControl
CheckBoxCollection
CollectionBase
Color
ColorFilter
ColorHelper
ColorScale
Column
ColumnCollection
ComboBox
ComboBoxActiveXControl
CommandButtonActiveXControl
Comment
CommentCollection
CommentShape
ConditionalFormattingCollection
ConditionalFormattingIcon
ConditionalFormattingIconCollection
ConditionalFormattingResult
ConditionalFormattingValue
ConditionalFormattingValueCollection
ConnectionParameter
ConnectionParameterCollection
ContentTypeProperty
ContentTypePropertyCollection
CopyOptions
CustomDocumentPropertyCollection
CustomFilter
CustomFilterCollection
CustomGeometry
CustomImplementationFactory
CustomProperty
CustomPropertyCollection
CustomXmlPart
CustomXmlPartCollection
CustomXmlShape
DataBar
DataBarBorder
DataLabels
DataSorter
DataSorterKey
DataSorterKeyCollection
DateTime
DateTimeGroupItem
DBConnection
DefaultStyleSettings
DeleteOptions
DialogBox
DifSaveOptions
DigitalSignature
DigitalSignatureCollection
DisplayUnitLabel
DocumentProperty
DocumentPropertyCollection
DocxSaveOptions
DrawObject
DrawObjectEventHandler
DropBars
DxfCollection
DynamicFilter
Encoding
ErrorBar
ErrorCheckOption
ErrorCheckOptionCollection
ExportObjectEvent
ExportRangeToJsonOptions
ExportTableOptions
ExternalConnection
ExternalConnectionCollection
ExternalLink
ExternalLinkCollection
FileFontSource
FileFormatInfo
FileFormatUtil
Fill
FillFormat
FilterColumn
FilterColumnCollection
FindOptions
Floor
FolderFontSource
Font
FontConfigs
FontSetting
FontSettingCollection
FontSourceBase
Format3D
FormatCondition
FormatConditionCollection
FormulaParseOptions
FormulaSettings
Geometry
GlobalizationSettings
GlowEffect
GradientFill
GradientStop
GradientStopCollection
GroupBox
GroupFill
GroupShape
HeaderFooterCommand
HorizontalPageBreak
HorizontalPageBreakCollection
HtmlLoadOptions
HtmlSaveOptions
Hyperlink
HyperlinkCollection
IconFilter
IconSet
ImageActiveXControl
ImageFormat
ImageOrPrintOptions
ImageSaveOptions
ImportTableOptions
IndividualFontConfigs
InsertOptions
InterruptMonitor
JsonLayoutOptions
JsonLoadOptions
JsonSaveOptions
JsonUtility
Label
LabelActiveXControl
Legend
LegendEntry
LegendEntryCollection
License
Line
LineFormat
LineShape
ListBox
ListBoxActiveXControl
ListColumn
ListColumnCollection
ListObject
ListObjectCollection
LoadFilter
LoadOptions
MarkdownSaveOptions
Marker
MemoryFontSource
MetadataOptions
Metered
MsoFillFormat
MsoFillFormatHelper
MsoFormatPicture
MsoLineFormat
MsoLineFormatHelper
MsoTextFrame
MultipleFilterCollection
Name
NameCollection
NegativeBarFormat
NoneBulletValue
NoneFill
OdsCellField
OdsCellFieldCollection
OdsLoadOptions
OdsPageBackground
OdsSaveOptions
OleObject
OleObjectCollection
OoxmlSaveOptions
Outline
Oval
PageEndSavingArgs
PageSavingArgs
PageSetup
PageStartSavingArgs
PaginatedSaveOptions
PaneCollection
PasteOptions
PatternFill
PdfBookmarkEntry
PdfSaveOptions
PdfSecurityOptions
PicFormatOption
Picture
PictureBulletValue
PictureCollection
PivotField
PivotFieldCollection
PivotFilter
PivotFilterCollection
PivotFormatCondition
PivotFormatConditionCollection
PivotItem
PivotItemCollection
PivotOptions
PivotPageFields
PivotTable
PivotTableCollection
PlotArea
PptxSaveOptions
ProtectedRange
ProtectedRangeCollection
Protection
QueryTable
QueryTableCollection
RadioButton
RadioButtonActiveXControl
Range
RangeCollection
RectangleShape
ReferredArea
ReferredAreaCollection
ReflectionEffect
ReplaceOptions
Revision
RevisionAutoFormat
RevisionCellChange
RevisionCellComment
RevisionCellMove
RevisionCollection
RevisionCustomView
RevisionDefinedName
RevisionFormat
RevisionInsertDelete
RevisionInsertSheet
RevisionLog
RevisionLogCollection
RevisionMergeConflict
RevisionQueryTable
RevisionRenameSheet
Row
RowCollection
SaveOptions
Scenario
ScenarioCollection
ScenarioInputCell
ScenarioInputCellCollection
ScrollBar
ScrollBarActiveXControl
Series
SeriesCollection
SeriesLayoutProperties
ShadowEffect
Shape
ShapeCollection
ShapeFormat
ShapeGuide
ShapeGuideCollection
ShapePath
ShapePathCollection
ShapePathPoint
ShapePathPointCollection
ShapePropertyCollection
ShapeSegmentPath
ShapeSegmentPathCollection
ShapeTextAlignment
SheetPrintingPreview
SheetRender
SheetSet
SignatureLine
Slicer
SlicerCache
SlicerCacheItem
SlicerCacheItemCollection
SlicerCollection
SmartArtShape
SmartTag
SmartTagCollection
SmartTagOptions
SmartTagProperty
SmartTagPropertyCollection
SmartTagSetting
SolidFill
Sparkline
SparklineCollection
SparklineGroup
SparklineGroupCollection
SpinButtonActiveXControl
Spinner
SpreadsheetML2003SaveOptions
StreamProviderOptions
Style
StyleFlag
SubtotalSetting
SvgSaveOptions
SxRng
TableStyle
TableStyleCollection
TableStyleElement
TableStyleElementCollection
TableToRangeOptions
TextBox
TextBoxActiveXControl
TextBoxCollection
TextEffectFormat
TextOptions
TextParagraph
TextParagraphCollection
TextTabStop
TextTabStopCollection
TextureFill
ThemeColor
ThreadedComment
ThreadedCommentAuthor
ThreadedCommentAuthorCollection
ThreadedCommentCollection
ThreeDFormat
TickLabelItem
TickLabels
TilePicOption
Timeline
TimelineCollection
Title
ToggleButtonActiveXControl
Top10
Top10Filter
Trendline
TrendlineCollection
TxtLoadOptions
TxtSaveOptions
UnionRange
UnknownControl
Validation
ValidationCollection
VbaModule
VbaModuleCollection
VbaProject
VbaProjectReference
VbaProjectReferenceCollection
VerticalPageBreak
VerticalPageBreakCollection
VmlShapeGuide
Walls
WarningInfo
WebExtension
WebExtensionBinding
WebExtensionBindingCollection
WebExtensionCollection
WebExtensionProperty
WebExtensionPropertyCollection
WebExtensionReference
WebExtensionReferenceCollection
WebExtensionShape
WebExtensionTaskPane
WebExtensionTaskPaneCollection
WebQueryConnection
Workbook
WorkbookDesigner
WorkbookMetadata
WorkbookPrintingPreview
WorkbookRender
WorkbookSettings
Worksheet
WorksheetCollection
WriteProtection
XlsbSaveOptions
XlsSaveOptions
XmlColumnProperty
XmlDataBinding
XmlLoadOptions
XmlMap
XmlMapCollection
XmlSaveOptions
XpsSaveOptions
Interfaces 
ICellsDataTable
ICustomFunction
ICustomParser
IExportObjectListener
IFilePathProvider
IPageSavingCallback
ISmartMarkerCallBack
IStreamProvider
IWarningCallback
LightCellsDataHandler
LightCellsDataProvider
Constants 
AccessCacheOptions
ActiveXPersistenceType
AutoFillType
AutoFitMergedCellsType
AutoFitWrappedTextType
AutoShapeType
AxisType
BackgroundMode
BackgroundType
Bar3DShapeType
BevelPresetType
BevelType
BorderType
BubbleSizeRepresents
BuiltinStyleType
BulletType
CalcModeType
CalculationPrecisionStrategy
CategoryType
CellBorderType
CellValueFormatStrategy
CellValueType
ChartLineFormattingType
ChartMarkerType
ChartSplitType
ChartTextDirectionType
ChartType
CheckValueType
ColorDepth
ColorType
CommentTitleType
ConnectionDataSourceType
ConnectionParameterType
ConsolidationFunction
ControlBorderType
ControlCaptionAlignmentType
ControlListStyle
ControlMatchEntryType
ControlMousePointerType
ControlPictureAlignmentType
ControlPicturePositionType
ControlPictureSizeMode
ControlScrollBarType
ControlScrollOrientation
ControlSpecialEffectType
ControlType
CopyFormatType
CountryCode
CredentialsMethodType
CrossType
DataBarAxisPosition
DataBarBorderType
DataBarFillType
DataBarNegativeColorType
DataLabelShapeType
DataLabelsSeparatorType
DataLablesSeparatorType
DateTimeGroupingType
DefaultEditLanguage
DirectoryType
DisplayDrawingObjects
DisplayUnitType
DrawObjectEnum
DropButtonStyle
DynamicFilterType
EmfRenderSetting
EncryptionType
ErrorBarDisplayType
ErrorBarType
ErrorCheckType
ExceptionType
ExternalLinkType
FileFormatType
FillPattern
FillPictureType
FillType
FilterOperatorType
FilterType
FontSchemeType
FontSourceType
FontUnderlineType
FormatConditionType
FormatConditionValueType
FormatSetType
FormattingType
GradientColorType
GradientDirectionType
GradientFillType
GradientPresetType
GradientStyleType
GridlineType
HeaderFooterCommandType
HtmlCrossType
HtmlExportDataOptions
HtmlFormatHandlingType
HtmlHiddenColDisplayType
HtmlHiddenRowDisplayType
HtmlLinkTargetType
IconSetType
ImageType
InputMethodEditorMode
LabelPositionType
LegendPositionType
LightRigDirectionType
LightRigType
LineCapType
LineJoinType
LineSpaceSizeType
LineType
LoadDataFilterOptions
LoadFormat
LookAtType
LookInType
MapChartLabelLayout
MapChartProjectionType
MapChartRegionType
MemorySetting
MetadataType
MirrorType
MsoArrowheadLength
MsoArrowheadStyle
MsoArrowheadWidth
MsoDrawingType
MsoLineDashStyle
MsoLineStyle
MsoPresetTextEffect
MsoPresetTextEffectShape
NameScopeType
NumberCategoryType
OdsCellFieldType
OdsGeneratorType
OdsPageBackgroundGraphicPositionType
OdsPageBackgroundGraphicType
OdsPageBackgroundType
OLEDBCommandType
OoxmlCompliance
OoxmlCompressionType
OperatorType
PageLayoutAlignmentType
PageOrientationType
PaneStateType
PaperSizeType
ParameterType
PasteOperationType
PasteType
PdfCompliance
PdfCompressionCore
PdfCustomPropertiesExport
PdfFontEncoding
PdfOptimizationType
PivotConditionFormatRuleType
PivotConditionFormatScopeType
PivotFieldDataDisplayFormat
PivotFieldSubtotalType
PivotFieldType
PivotFilterType
PivotGroupByType
PivotItemPosition
PivotMissingItemLimitType
PivotTableAutoFormatType
PivotTableStyleType
PlacementType
PlotDataByType
PlotEmptyCellsType
PresetCameraType
PresetMaterialType
PresetShadowType
PresetWordArtStyle
PrintCommentsType
PrintErrorsType
PrintingPageType
PrintOrderType
PrintSizeType
PropertyType
ProtectionType
QuartileCalculationType
ReConnectionMethodType
RectangleAlignmentType
ReflectionEffectType
RenameStrategy
ResourceLoadingType
RevisionActionType
RevisionType
SaveFormat
SelectionType
ShapeAnchorType
ShapeLockType
ShapePathType
SheetType
ShiftType
ShowDropButtonType
SlicerCacheCrossFilterType
SlicerCacheItemSortType
SlicerStyleType
SmartTagShowType
SortOnType
SortOrder
SparklineAxisMinMaxType
SparklinePresetStyleType
SparklineType
SqlDataType
StyleModifyFlag
TableDataSourceType
TableStyleElementType
TableStyleType
TargetModeType
TextAlignmentType
TextAutonumberScheme
TextCapsType
TextCrossType
TextDirectionType
TextFontAlignType
TextNodeType
TextOrientationType
TextOverflowType
TextStrikeType
TextTabAlignmentType
TextureType
TextVerticalType
ThemeColorType
TickLabelPositionType
TickMarkType
TiffCompression
TimePeriodType
TimeUnit
TotalsCalculation
TrendlineType
TxtLoadStyleStrategy
TxtValueQuoteType
UpdateLinksType
ValidationAlertType
ValidationType
VbaModuleType
VbaProjectReferenceType
ViewType
VisibilityType
WarningType
WebExtensionStoreType
WeightType
XAdESType

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.

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");

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");

getBlackAndWhite/setBlackAndWhite

public boolean getBlackAndWhite() / 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.

getCenterVertically/setCenterVertically

public boolean getCenterVertically() / 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.

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.

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.

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.

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.

getPrinterSettings/setPrinterSettings

public byte[] getPrinterSettings() / 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.

getLeftMarginInch/setLeftMarginInch

public double getLeftMarginInch() / 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.

getRightMarginInch/setRightMarginInch

public double getRightMarginInch() / 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.

getTopMarginInch/setTopMarginInch

public double getTopMarginInch() / 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.

getBottomMarginInch/setBottomMarginInch

public double getBottomMarginInch() / 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.

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.

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.

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.

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.

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.

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.

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.

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.

getPrintHeadings/setPrintHeadings

public boolean getPrintHeadings() / 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.

getZoom/setZoom

public int getZoom() / 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.

getPrintQuality/setPrintQuality

public int getPrintQuality() / 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.

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.

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.

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.

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.

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.