- java.lang.Object
-
- org.dhatim.fastexcel.Range
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int r, int c)Check if this range contains the given cell coordinates.TablecreateTable()TablecreateTable(String... headers)booleanequals(Object obj)intgetBottom()Get bottom row.intgetLeft()Get left column.intgetRight()Get right column.intgetTop()Get top row.WorksheetgetWorksheet()Get parent worksheet.inthashCode()booleanisFolderScope()Check if this range has a folder scope.voidmerge()Merge cells within this range.voidsetFolderScope(boolean folderScope)Set the visibility of this rangevoidsetHyperlink(HyperLink hyperLink)voidsetName(String name)Specifically define this range by assigning it a name.StyleSetterstyle()Get a new style setter for this range.StringtoAbsoluteString()Get an absolute reference to this Range.StringtoString()CustomDataValidationvalidateWithFormula(String formula)Construct a new ListDataValidationListDataValidationvalidateWithList(Range listRange)Construct a new ListDataValidationListFormulaDataValidationvalidateWithListByFormula(String formula)Construct a new ListDataValidation-
Methods inherited from interface org.dhatim.fastexcel.Ref
colToString
-
-
-
-
Method Detail
-
getWorksheet
public Worksheet getWorksheet()
Get parent worksheet.- Returns:
- Parent worksheet.
-
getTop
public int getTop()
Get top row.- Returns:
- Top row.
-
getLeft
public int getLeft()
Get left column.- Returns:
- Left column.
-
getBottom
public int getBottom()
Get bottom row.- Returns:
- Bottom row.
-
getRight
public int getRight()
Get right column.- Returns:
- Right column.
-
toAbsoluteString
public String toAbsoluteString()
Get an absolute reference to this Range. ex: $A$1:$A$5- Returns:
- absolute reference
-
style
public StyleSetter style()
Get a new style setter for this range.- Returns:
- Newly created style setter.
-
merge
public void merge()
Merge cells within this range.
-
contains
public boolean contains(int r, int c)Check if this range contains the given cell coordinates.- Parameters:
r- Zero-based row number.c- Zero-based column number.- Returns:
trueif this range contains the given cell coordinates.
-
validateWithList
public ListDataValidation validateWithList(Range listRange)
Construct a new ListDataValidation- Parameters:
listRange- The Range of the list this validation references- Returns:
- a new list data validation object
-
validateWithListByFormula
public ListFormulaDataValidation validateWithListByFormula(String formula)
Construct a new ListDataValidation- Parameters:
formula- The Formula to retrieve the validation list- Returns:
- a new list data validation object
-
validateWithFormula
public CustomDataValidation validateWithFormula(String formula)
Construct a new ListDataValidation- Parameters:
formula- The custom validation formula- Returns:
- a new custom validation
-
setName
public void setName(String name)
Specifically define this range by assigning it a name. It will be visible in the cell range dropdown menu.- Parameters:
name- string representing the name of this cell range
-
isFolderScope
public boolean isFolderScope()
Check if this range has a folder scope. It is used byWorksheet.addNamedRange(Range, String).- Returns:
trueif the range has a folder scope,falseif it is visible only by the worksheet contains the range
-
setFolderScope
public void setFolderScope(boolean folderScope)
Set the visibility of this range- Parameters:
folderScope-trueto allow to see the range by all worksheet
-
setHyperlink
public void setHyperlink(HyperLink hyperLink)
-
createTable
public Table createTable()
-
-