public class CellRangeRef extends Object implements Cloneable
DataBoundCellRange,
XLSRecord| Constructor and Description |
|---|
CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col) |
CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
String first_sheet,
String last_sheet) |
CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
WorkSheetHandle first_sheet,
WorkSheetHandle last_sheet) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates and returns a copy of this range.
|
boolean |
contains(CellRangeRef range)
Returns whether this range entirely contains the given range.
|
boolean |
equals(Object other)
Compares this range to the specified object.
|
static CellRangeRef |
fromA1(String reference)
Parses a range in A1 notation and returns the equivalent CellRangeRef.
|
static CellRangeRef |
fromA1(String reference,
WorkBookHandle book)
Convenience method combining
fromA1(String) and
resolve(WorkBookHandle). |
int |
getFirstColumn()
Returns the lowest-indexed column in this range.
|
int |
getFirstRow()
Returns the lowest-indexed row in this range.
|
WorkSheetHandle |
getFirstSheet()
Returns the first sheet in this range.
|
String |
getFirstSheetName()
Returns the name of the first sheet in this range.
|
int |
getLastColumn()
Returns the highest-indexed column in this range.
|
int |
getLastRow()
Returns the highest-indexed row in this range.
|
WorkSheetHandle |
getLastSheet()
Returns the last sheet in this range.
|
String |
getLastSheetName()
Returns the name of the last sheet in this range.
|
boolean |
hasSheet()
Determines whether this range is qualified with a sheet.
|
boolean |
isMultiSheet()
Determines whether this range spans multiple sheets.
|
int |
numCells()
return the number of cells in this rangeref
|
void |
resolve(WorkBookHandle book)
Resolves sheet names into sheet handles against the given book.
|
void |
setFirstColumn(int value)
Sets the first column in this range.
|
void |
setFirstRow(int value)
Sets the first row in this range.
|
void |
setFirstSheet(WorkSheetHandle sheet)
Sets the first sheet in this range.
|
void |
setLastColumn(int value)
Sets the last column in this range.
|
void |
setLastRow(int value)
Sets the last row in this range.
|
void |
setLastSheet(WorkSheetHandle sheet)
Sets the last sheet in this range.
|
String |
toString()
Gets this range in A1 notation.
|
public CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col)
public CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
String first_sheet,
String last_sheet)
public CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
WorkSheetHandle first_sheet,
WorkSheetHandle last_sheet)
public int numCells()
public static CellRangeRef fromA1(String reference)
public static CellRangeRef fromA1(String reference, WorkBookHandle book) throws WorkSheetNotFoundException
fromA1(String) and
resolve(WorkBookHandle).WorkSheetNotFoundExceptionpublic void resolve(WorkBookHandle book) throws WorkSheetNotFoundException
book - the book against which the sheet names should be resolvedWorkSheetNotFoundException - if either of the sheets does not exist in the given bookpublic int getFirstRow()
public int getFirstColumn()
public int getLastRow()
public int getLastColumn()
public String getFirstSheetName()
public WorkSheetHandle getFirstSheet()
public String getLastSheetName()
public WorkSheetHandle getLastSheet()
public boolean hasSheet()
public boolean isMultiSheet()
public void setFirstRow(int value)
value - the row index to setpublic void setFirstColumn(int value)
value - the column index to setpublic void setFirstSheet(WorkSheetHandle sheet)
public void setLastRow(int value)
value - the row index to setpublic void setLastColumn(int value)
value - the column index to setpublic void setLastSheet(WorkSheetHandle sheet)
public boolean contains(CellRangeRef range)
public boolean equals(Object other)
true
if and only if the argument is not null and is a
CellRangeRef object that represents the same range as this
object.public Object clone()
Copyright © 2002–2019 Starter Inc.. All rights reserved.