Namespace EasyXLS
Class ExcelPageSetup
System.Object
EasyXLS.ExcelPageSetup
public class ExcelPageSetup
extends System.Object
This class stores page setup settings like print area, the rows to be repeated at top,
columns to be repeated at left, page orientation (portrait, landscape), paper size,
scaling factor, fit to pages width/height, paper margins, print order,
horizontal and vertical page breaks and other customizations like:
print gridlines, print black and white, print draft quality, print row and column headings, print comments.
-
Method Summary
Modifier and TypeMethodDescriptionboolReturns the center horizontally option for the page.boolReturns the center vertically option for the page.System.StringReturns the columns to repeat at left.System.StringReturns the print area.System.StringReturns the rows to repeat at top.voidRemoves the print area.voideasy_setColumnsToRepeatAtLeft(int startColumn, int endColumn) Sets the columns to repeat at left.voideasy_setColumnsToRepeatAtLeft(int startColumn, int endColumn, bool isR1C1ReferenceStyle) Sets the columns to repeat at left.
This method is overridden as easy_setColumnsToRepeatAtLeft_2 in COM+ version of EasyXLS.voideasy_setColumnsToRepeatAtLeft(System.String columnRange) Sets the columns to repeat at left.
This method is overridden as easy_setColumnsToRepeatAtLeft_3 in COM+ version of EasyXLS.voideasy_setPrintArea(int startRow, int startColumn, int endRow, int endColumn) Sets the print area.voideasy_setPrintArea(int startRow, int startColumn, int endRow, int endColumn, bool isR1C1ReferenceStyle) Sets the print area.
This method is overridden as easy_setPrintArea_2 in COM+ version of EasyXLS.voideasy_setPrintArea(System.String range) Sets the print area.
This method is overridden as easy_setPrintArea_3 in COM+ version of EasyXLS.voideasy_setRowsToRepeatAtTop(int startRow, int endRow) Sets the rows to repeat at top.voideasy_setRowsToRepeatAtTop(int startRow, int endRow, bool isR1C1ReferenceStyle) Sets the rows to repeat at top.
This method is overridden as easy_setRowsToRepeatAtTop_2 in COM+ version of EasyXLS.voideasy_setRowsToRepeatAtTop(System.String rowRange) Sets the rows to repeat at top.
This method is overridden as easy_setRowsToRepeatAtTop_3 in COM+ version of EasyXLS.doubleReturns the bottom margin of the paper.intReturns the starting page number.intReturns the number of pages to fit in the page height.intReturns the number of pages to fit in the page width.doubleReturns the footer margin of the paper.doubleReturns the header margin of the paper.doubleReturns the left margin of the paper.System.StringReturns the page orientation.intReturns the print page order.intReturns the paper size.System.StringInternal use onlyintReturns the print comments option for the page.doubleReturns the right margin of the paper.intReturns the scaling factor.doubleReturns the top margin of the paper.boolReturns the print black and white option for the page.boolReturns the print draft quality option for the page.boolReturns the print gridlines option for the page.boolReturns the print row and column headings option for the page.voidsetBottomMargin(double bottomMargin) Sets the bottom margin of the paper.voidsetCenterHorizontally(bool isCenterHorizontally) Sets the center horizontally option for the page.voidsetCenterVertically(bool isCenterVertically) Sets the center vertically option for the page.voidsetFirstPageNumber(int firstPageNumber) Sets the starting page number.voidsetFitToPagesHeight(int value) Sets the number of pages to fit in the page height.voidsetFitToPagesWidth(int value) Sets the number of pages to fit in the page width.voidsetFooterMargin(double footerMargin) Sets the footer margin of the paper.voidsetHeaderMargin(double headerMargin) Sets the header margin of the paper.voidsetLeftMargin(double leftMargin) Sets the left margin of the paper.voidsetOrientation(System.String orientation) Sets the page orientation.voidsetPageOrder(int pageOrder) Sets the print page order.voidsetPaperSize(int paperSize) Sets the paper size.voidsetPrintBlackAndWhite(bool printBlackAndWhite) Sets the print black and white option for the page.voidsetPrintComments(int position) Sets the print comments option for the page.voidsetPrintDraftQuality(bool printDraftQuality) Sets the print draft quality option for the page.voidsetPrintGridlines(bool printGridlines) Sets the print gridlines option for the page.voidsetPrintRowAndColumnHeadings(bool printRowAndColumnHeadings) Sets the print row and column headings option for the page.voidsetRightMargin(double rightMargin) Sets the right margin of the paper.voidsetScalingFactor(int scalingFactor) Sets the scaling factor.voidsetTopMargin(double topMargin) Sets the top margin of the paper.Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
easy_setPrintArea
public void easy_setPrintArea(int startRow, int startColumn, int endRow, int endColumn, bool isR1C1ReferenceStyle) Sets the print area.
This method is overridden as easy_setPrintArea_2 in COM+ version of EasyXLS.- Parameters:
startRow- the start row of the range that defines the print areastartColumn- the start column of the range that defines the print areaendRow- the end row of the range that defines the print areaendColumn- the end column of the range that defines the print areaisR1C1ReferenceStyle- the R1C1 reference style of the document- See Also:
-
easy_setPrintArea
public void easy_setPrintArea(int startRow, int startColumn, int endRow, int endColumn) Sets the print area. You should use this method only if the ExcelDocument R1C1 style reference flag is set to true.- Parameters:
startRow- the start row of the range that defines the print areastartColumn- the start column of the range that defines the print areaendRow- the end row of the range that defines the print areaendColumn- the end column of the range that defines the print area- See Also:
-
easy_setPrintArea
public void easy_setPrintArea(System.String range) Sets the print area.
This method is overridden as easy_setPrintArea_3 in COM+ version of EasyXLS.- Parameters:
range- the print area. It can be a cell reference, a range or union of ranges.- See Also:
-
easy_getPrintArea
public System.String easy_getPrintArea()Returns the print area. It can be a cell reference or a cell range.- Returns:
- the print area
- See Also:
-
getPrintArea
public System.String getPrintArea()Internal use only- Returns:
- the print area
-
easy_removePrintArea
public void easy_removePrintArea()Removes the print area.- See Also:
-
easy_setRowsToRepeatAtTop
public void easy_setRowsToRepeatAtTop(int startRow, int endRow, bool isR1C1ReferenceStyle) Sets the rows to repeat at top.
This method is overridden as easy_setRowsToRepeatAtTop_2 in COM+ version of EasyXLS.- Parameters:
startRow- - first row index of the row rangeendRow- - last row index of the row rangeisR1C1ReferenceStyle- the R1C1 reference style of the document- See Also:
-
easy_setRowsToRepeatAtTop
public void easy_setRowsToRepeatAtTop(int startRow, int endRow) Sets the rows to repeat at top. You should use this method only if the ExcelDocument R1C1 style reference flag is set to true.- Parameters:
startRow- - first row index of the row rangeendRow- - last row index of the row range- See Also:
-
easy_setRowsToRepeatAtTop
public void easy_setRowsToRepeatAtTop(System.String rowRange) Sets the rows to repeat at top.
This method is overridden as easy_setRowsToRepeatAtTop_3 in COM+ version of EasyXLS.- Parameters:
rowRange- - a row range that defines the rows to repeat at top (like "$1:$2")- See Also:
-
easy_getRowsToRepeatAtTop
public System.String easy_getRowsToRepeatAtTop()Returns the rows to repeat at top.- Returns:
- a row range representing the rows to repeat at top
- See Also:
-
easy_getColumnsToRepeatAtLeft
public System.String easy_getColumnsToRepeatAtLeft()Returns the columns to repeat at left.- Returns:
- a column range representing the columns to repeat at left
- See Also:
-
easy_setColumnsToRepeatAtLeft
public void easy_setColumnsToRepeatAtLeft(int startColumn, int endColumn, bool isR1C1ReferenceStyle) Sets the columns to repeat at left.
This method is overridden as easy_setColumnsToRepeatAtLeft_2 in COM+ version of EasyXLS.- Parameters:
startColumn- - first column index of the column rangeendColumn- - last column index of the column rangeisR1C1ReferenceStyle- the R1C1 reference style of the document- See Also:
-
easy_setColumnsToRepeatAtLeft
public void easy_setColumnsToRepeatAtLeft(int startColumn, int endColumn) Sets the columns to repeat at left. You should use this method only if the ExcelDocument R1C1 style reference flag is set to true.- Parameters:
startColumn- - first column index of the column rangeendColumn- - last column index of the column range- See Also:
-
easy_setColumnsToRepeatAtLeft
public void easy_setColumnsToRepeatAtLeft(System.String columnRange) Sets the columns to repeat at left.
This method is overridden as easy_setColumnsToRepeatAtLeft_3 in COM+ version of EasyXLS.- Parameters:
columnRange- - a column range that defines the columns to repeat at left (like "$A:$B")- See Also:
-
getOrientation
public System.String getOrientation()Returns the page orientation. Possible values are available inPageSetupclass.- Returns:
- the page orientation
- See Also:
-
setOrientation
public void setOrientation(System.String orientation) Sets the page orientation. Possible values are available inPageSetupclass.- Parameters:
orientation- the page orientation- See Also:
-
getPaperSize
public int getPaperSize()Returns the paper size. Possible values are available inPageSetupclass.- Returns:
- the paper size
- See Also:
-
setPaperSize
public void setPaperSize(int paperSize) Sets the paper size. Possible values are available inPageSetupclass.- Parameters:
paperSize- the paper size- See Also:
-
getScalingFactor
public int getScalingFactor()Returns the scaling factor.- Returns:
- the scaling factor
- See Also:
-
setScalingFactor
public void setScalingFactor(int scalingFactor) Sets the scaling factor.- Parameters:
scalingFactor- the scaling factor- See Also:
-
getFitToPagesWidth
public int getFitToPagesWidth()Returns the number of pages to fit in the page width.- Returns:
- the number of pages to fit in the page width
- See Also:
-
setFitToPagesWidth
public void setFitToPagesWidth(int value) Sets the number of pages to fit in the page width.- Parameters:
value- the number of pages to fit in the page width- See Also:
-
getFitToPagesHeight
public int getFitToPagesHeight()Returns the number of pages to fit in the page height.- Returns:
- the number of pages to fit in the page height
- See Also:
-
setFitToPagesHeight
public void setFitToPagesHeight(int value) Sets the number of pages to fit in the page height.- Parameters:
value- the number of pages to fit in the page height- See Also:
-
getFirstPageNumber
public int getFirstPageNumber()Returns the starting page number.- Returns:
- the starting page number
- See Also:
-
setFirstPageNumber
public void setFirstPageNumber(int firstPageNumber) Sets the starting page number.- Parameters:
firstPageNumber- the starting page number- See Also:
-
getTopMargin
public double getTopMargin()Returns the top margin of the paper.- Returns:
- the top margin of the paper
- See Also:
-
setTopMargin
public void setTopMargin(double topMargin) Sets the top margin of the paper.- Parameters:
topMargin- the top margin of the paper- See Also:
-
getBottomMargin
public double getBottomMargin()Returns the bottom margin of the paper.- Returns:
- the bottom margin of the paper
- See Also:
-
setBottomMargin
public void setBottomMargin(double bottomMargin) Sets the bottom margin of the paper.- Parameters:
bottomMargin- the bottom margin of the paper- See Also:
-
getLeftMargin
public double getLeftMargin()Returns the left margin of the paper.- Returns:
- the left margin of the paper
- See Also:
-
setLeftMargin
public void setLeftMargin(double leftMargin) Sets the left margin of the paper.- Parameters:
leftMargin- the left margin of the paper- See Also:
-
getRightMargin
public double getRightMargin()Returns the right margin of the paper.- Returns:
- the right margin of the paper
- See Also:
-
setRightMargin
public void setRightMargin(double rightMargin) Sets the right margin of the paper.- Parameters:
rightMargin- the right margin of the paper- See Also:
-
getHeaderMargin
public double getHeaderMargin()Returns the header margin of the paper.- Returns:
- the header margin of the paper
- See Also:
-
setHeaderMargin
public void setHeaderMargin(double headerMargin) Sets the header margin of the paper.- Parameters:
headerMargin- the header margin of the paper- See Also:
-
CenterHorizontally
public bool CenterHorizontally()Returns the center horizontally option for the page.- Returns:
- the center horizontally option for the page
- See Also:
-
setCenterHorizontally
public void setCenterHorizontally(bool isCenterHorizontally) Sets the center horizontally option for the page.- Parameters:
isCenterHorizontally- the center horizontally option for the page- See Also:
-
CenterVertically
public bool CenterVertically()Returns the center vertically option for the page.- Returns:
- the center vertically option for the page
- See Also:
-
setCenterVertically
public void setCenterVertically(bool isCenterVertically) Sets the center vertically option for the page.- Parameters:
isCenterVertically- the center vertically option for the page- See Also:
-
PrintGridlines
public bool PrintGridlines()Returns the print gridlines option for the page.- Returns:
- the print gridlines option for the page
- See Also:
-
setPrintGridlines
public void setPrintGridlines(bool printGridlines) Sets the print gridlines option for the page.- Parameters:
printGridlines- the print gridlines option for the page- See Also:
-
PrintBlackAndWhite
public bool PrintBlackAndWhite()Returns the print black and white option for the page.- Returns:
- the print black and white option for the page
- See Also:
-
setPrintBlackAndWhite
public void setPrintBlackAndWhite(bool printBlackAndWhite) Sets the print black and white option for the page.- Parameters:
printBlackAndWhite- the print black and white option for the page- See Also:
-
PrintDraftQuality
public bool PrintDraftQuality()Returns the print draft quality option for the page.- Returns:
- the print draft quality option for the page
- See Also:
-
setPrintDraftQuality
public void setPrintDraftQuality(bool printDraftQuality) Sets the print draft quality option for the page.- Parameters:
printDraftQuality- the print draft quality option for the page- See Also:
-
PrintRowAndColumnHeadings
public bool PrintRowAndColumnHeadings()Returns the print row and column headings option for the page.- Returns:
- the print row and column headings option for the page
- See Also:
-
setPrintRowAndColumnHeadings
public void setPrintRowAndColumnHeadings(bool printRowAndColumnHeadings) Sets the print row and column headings option for the page.- Parameters:
printRowAndColumnHeadings- the print row and column headings option for the page- See Also:
-
getPrintComments
public int getPrintComments()Returns the print comments option for the page. Possible values are available inPageSetupclass.- Returns:
- the print comments option for the page
- See Also:
-
setPrintComments
public void setPrintComments(int position) Sets the print comments option for the page. Possible values are available inPageSetupclass.- Parameters:
position- the print comments option for the page- See Also:
-
getPageOrder
public int getPageOrder()Returns the print page order. Possible values are available inPageSetupclass.- Returns:
- the print page order
- See Also:
-
setPageOrder
public void setPageOrder(int pageOrder) Sets the print page order. Possible values are available inPageSetupclass.- Parameters:
pageOrder- the print page order- See Also:
-