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 TypeMethodDescriptionbool
Returns the center horizontally option for the page.bool
Returns the center vertically option for the page.System.String
Returns the columns to repeat at left.System.String
Returns the print area.System.String
Returns the rows to repeat at top.void
Removes the print area.void
easy_setColumnsToRepeatAtLeft(int startColumn, int endColumn)
Sets the columns to repeat at left.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.
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.
void
easy_setPrintArea(int startRow, int startColumn, int endRow, int endColumn)
Sets the print area.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.
void
easy_setPrintArea(System.String range)
Sets the print area.
This method is overridden as easy_setPrintArea_3 in COM+ version of EasyXLS.
void
easy_setRowsToRepeatAtTop(int startRow, int endRow)
Sets the rows to repeat at top.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.
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.
double
Returns the bottom margin of the paper.int
Returns the starting page number.int
Returns the number of pages to fit in the page height.int
Returns the number of pages to fit in the page width.double
Returns the footer margin of the paper.double
Returns the header margin of the paper.double
Returns the left margin of the paper.System.String
Returns the page orientation.int
Returns the print page order.int
Returns the paper size.System.String
Internal use onlyint
Returns the print comments option for the page.double
Returns the right margin of the paper.int
Returns the scaling factor.double
Returns the top margin of the paper.bool
Returns the print black and white option for the page.bool
Returns the print draft quality option for the page.bool
Returns the print gridlines option for the page.bool
Returns the print row and column headings option for the page.void
setBottomMargin(double bottomMargin)
Sets the bottom margin of the paper.void
setCenterHorizontally(bool isCenterHorizontally)
Sets the center horizontally option for the page.void
setCenterVertically(bool isCenterVertically)
Sets the center vertically option for the page.void
setFirstPageNumber(int firstPageNumber)
Sets the starting page number.void
setFitToPagesHeight(int value)
Sets the number of pages to fit in the page height.void
setFitToPagesWidth(int value)
Sets the number of pages to fit in the page width.void
setFooterMargin(double footerMargin)
Sets the footer margin of the paper.void
setHeaderMargin(double headerMargin)
Sets the header margin of the paper.void
setLeftMargin(double leftMargin)
Sets the left margin of the paper.void
setOrientation(System.String orientation)
Sets the page orientation.void
setPageOrder(int pageOrder)
Sets the print page order.void
setPaperSize(int paperSize)
Sets the paper size.void
setPrintBlackAndWhite(bool printBlackAndWhite)
Sets the print black and white option for the page.void
setPrintComments(int position)
Sets the print comments option for the page.void
setPrintDraftQuality(bool printDraftQuality)
Sets the print draft quality option for the page.void
setPrintGridlines(bool printGridlines)
Sets the print gridlines option for the page.void
setPrintRowAndColumnHeadings(bool printRowAndColumnHeadings)
Sets the print row and column headings option for the page.void
setRightMargin(double rightMargin)
Sets the right margin of the paper.void
setScalingFactor(int scalingFactor)
Sets the scaling factor.void
setTopMargin(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(String)
,easy_getPrintArea()
,easy_removePrintArea()
-
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(String)
,easy_getPrintArea()
,easy_removePrintArea()
-
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_setPrintArea(int,int,int,int)
,easy_getPrintArea()
,easy_removePrintArea()
-
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:
easy_setPrintArea(int,int,int,int)
,easy_setPrintArea(String)
,easy_removePrintArea()
-
getPrintArea
public System.String getPrintArea()Internal use only- Returns:
- the print area
-
easy_removePrintArea
public void easy_removePrintArea()Removes the print area. -
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_getRowsToRepeatAtTop()
,easy_setColumnsToRepeatAtLeft(int, int, bool)
,easy_getColumnsToRepeatAtLeft()
-
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_getRowsToRepeatAtTop()
,easy_setColumnsToRepeatAtLeft(int, int, bool)
,easy_getColumnsToRepeatAtLeft()
-
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()
,easy_setColumnsToRepeatAtLeft(int, int, bool)
,easy_getColumnsToRepeatAtLeft()
-
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_setRowsToRepeatAtTop(int, int, bool)
,easy_setColumnsToRepeatAtLeft(int, int, bool)
,easy_getColumnsToRepeatAtLeft()
-
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(int, int, bool)
,easy_setRowsToRepeatAtTop(int, int, bool)
,easy_getRowsToRepeatAtTop()
-
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_getColumnsToRepeatAtLeft()
,easy_setRowsToRepeatAtTop(int, int, bool)
,easy_getRowsToRepeatAtTop()
-
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_getColumnsToRepeatAtLeft()
,easy_setRowsToRepeatAtTop(int, int, bool)
,easy_getRowsToRepeatAtTop()
-
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:
easy_getColumnsToRepeatAtLeft()
,easy_setRowsToRepeatAtTop(int, int, bool)
,easy_getRowsToRepeatAtTop()
-
getOrientation
public System.String getOrientation()Returns the page orientation. Possible values are available inPageSetup
class.- Returns:
- the page orientation
- See Also:
setOrientation(System.String)
-
setOrientation
public void setOrientation(System.String orientation)Sets the page orientation. Possible values are available inPageSetup
class.- Parameters:
orientation
- the page orientation- See Also:
getOrientation()
-
getPaperSize
public int getPaperSize()Returns the paper size. Possible values are available inPageSetup
class.- Returns:
- the paper size
- See Also:
setPaperSize(int)
-
setPaperSize
public void setPaperSize(int paperSize)Sets the paper size. Possible values are available inPageSetup
class.- Parameters:
paperSize
- the paper size- See Also:
getPaperSize()
-
getScalingFactor
public int getScalingFactor()Returns the scaling factor.- Returns:
- the scaling factor
- See Also:
setScalingFactor(int)
-
setScalingFactor
public void setScalingFactor(int scalingFactor)Sets the scaling factor.- Parameters:
scalingFactor
- the scaling factor- See Also:
getScalingFactor()
-
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(int)
,getFitToPagesHeight()
,setFitToPagesHeight(int)
-
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:
getFitToPagesWidth()
,getFitToPagesHeight()
,setFitToPagesHeight(int)
-
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(int)
,getFitToPagesWidth()
,setFitToPagesWidth(int)
-
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:
getFitToPagesHeight()
,getFitToPagesWidth()
,setFitToPagesWidth(int)
-
getFirstPageNumber
public int getFirstPageNumber()Returns the starting page number.- Returns:
- the starting page number
- See Also:
setFirstPageNumber(int)
-
setFirstPageNumber
public void setFirstPageNumber(int firstPageNumber)Sets the starting page number.- Parameters:
firstPageNumber
- the starting page number- See Also:
getFirstPageNumber()
-
getTopMargin
public double getTopMargin()Returns the top margin of the paper.- Returns:
- the top margin of the paper
- See Also:
setTopMargin(double)
,getBottomMargin()
,getLeftMargin()
,getRightMargin()
-
setTopMargin
public void setTopMargin(double topMargin)Sets the top margin of the paper.- Parameters:
topMargin
- the top margin of the paper- See Also:
getTopMargin()
,setBottomMargin(double)
,setLeftMargin(double)
,setRightMargin(double)
-
getBottomMargin
public double getBottomMargin()Returns the bottom margin of the paper.- Returns:
- the bottom margin of the paper
- See Also:
setBottomMargin(double)
,getTopMargin()
,getLeftMargin()
,getRightMargin()
-
setBottomMargin
public void setBottomMargin(double bottomMargin)Sets the bottom margin of the paper.- Parameters:
bottomMargin
- the bottom margin of the paper- See Also:
getBottomMargin()
,setTopMargin(double)
,setLeftMargin(double)
,setRightMargin(double)
-
getLeftMargin
public double getLeftMargin()Returns the left margin of the paper.- Returns:
- the left margin of the paper
- See Also:
setLeftMargin(double)
,getTopMargin()
,getBottomMargin()
,getRightMargin()
-
setLeftMargin
public void setLeftMargin(double leftMargin)Sets the left margin of the paper.- Parameters:
leftMargin
- the left margin of the paper- See Also:
getLeftMargin()
,setTopMargin(double)
,setBottomMargin(double)
,setRightMargin(double)
-
getRightMargin
public double getRightMargin()Returns the right margin of the paper.- Returns:
- the right margin of the paper
- See Also:
setRightMargin(double)
,getTopMargin()
,getBottomMargin()
,getLeftMargin()
-
setRightMargin
public void setRightMargin(double rightMargin)Sets the right margin of the paper.- Parameters:
rightMargin
- the right margin of the paper- See Also:
getRightMargin()
,setTopMargin(double)
,setBottomMargin(double)
,setLeftMargin(double)
-
getHeaderMargin
public double getHeaderMargin()Returns the header margin of the paper.- Returns:
- the header margin of the paper
- See Also:
setHeaderMargin(double)
,getFooterMargin()
-
setHeaderMargin
public void setHeaderMargin(double headerMargin)Sets the header margin of the paper.- Parameters:
headerMargin
- the header margin of the paper- See Also:
getHeaderMargin()
,setFooterMargin(double)
-
CenterHorizontally
public bool CenterHorizontally()Returns the center horizontally option for the page.- Returns:
- the center horizontally option for the page
- See Also:
setCenterHorizontally(bool)
,CenterVertically()
,setCenterVertically(bool)
-
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:
CenterHorizontally()
,CenterVertically()
,setCenterVertically(bool)
-
CenterVertically
public bool CenterVertically()Returns the center vertically option for the page.- Returns:
- the center vertically option for the page
- See Also:
setCenterVertically(bool)
,CenterHorizontally()
,setCenterHorizontally(bool)
-
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:
CenterVertically()
,CenterHorizontally()
,setCenterHorizontally(bool)
-
PrintGridlines
public bool PrintGridlines()Returns the print gridlines option for the page.- Returns:
- the print gridlines option for the page
- See Also:
setPrintGridlines(bool)
-
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:
PrintGridlines()
-
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(bool)
-
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:
PrintBlackAndWhite()
-
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(bool)
-
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:
PrintDraftQuality()
-
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(bool)
-
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:
PrintRowAndColumnHeadings()
-
getPrintComments
public int getPrintComments()Returns the print comments option for the page. Possible values are available inPageSetup
class.- Returns:
- the print comments option for the page
- See Also:
setPrintComments(int)
-
setPrintComments
public void setPrintComments(int position)Sets the print comments option for the page. Possible values are available inPageSetup
class.- Parameters:
position
- the print comments option for the page- See Also:
getPrintComments()
-
getPageOrder
public int getPageOrder()Returns the print page order. Possible values are available inPageSetup
class.- Returns:
- the print page order
- See Also:
setPageOrder(int)
-
setPageOrder
public void setPageOrder(int pageOrder)Sets the print page order. Possible values are available inPageSetup
class.- Parameters:
pageOrder
- the print page order- See Also:
getPageOrder()
-