String |
formatAsString()
Example return values:
Result | Comment
A1:A1Single cell area reference without sheet
A1:$C$1Multi-cell area reference without sheet
Sheet1!A$1:B4Standard sheet name
'O''Brien''s Sales'!B5:C6' Sheet name with special characters
|
static AreaReference[] |
generateContiguous(String reference)
Takes a non-contiguous area reference, and
returns an array of contiguous area references.
|
CellReference[] |
getAllReferencedCells()
Returns a reference to every cell covered by this area
|
CellReference |
getFirstCell() |
CellReference |
getLastCell()
Note - if this area reference refers to a single cell, the return value of this method will
be identical to that of getFirstCell()
|
static AreaReference |
getWholeColumn(SpreadsheetVersion version,
String start,
String end) |
static AreaReference |
getWholeRow(SpreadsheetVersion version,
String start,
String end) |
static boolean |
isContiguous(String reference)
Is the reference for a contiguous (i.e.
|
boolean |
isSingleCell() |
boolean |
isWholeColumnReference() |
static boolean |
isWholeColumnReference(SpreadsheetVersion version,
CellReference topLeft,
CellReference botRight)
Is the reference for a whole-column reference,
such as C:C or D:G ?
|
boolean |
isWholeRowReference()
e.g.
|
static boolean |
isWholeRowReference(SpreadsheetVersion version,
CellReference topLeft,
CellReference botRight) |
String |
toString() |
-
-
Constructor Detail
-
AreaReference
public AreaReference(String reference)
Create an area ref from a string representation. Sheet names containing special characters should be
delimited and escaped as per normal syntax rules for formulas.
The area reference must be contiguous (i.e. represent a single rectangle, not a union of rectangles)
-
AreaReference
public AreaReference(CellReference topLeft,
CellReference botRight)
Creates an area ref from a pair of Cell References.
-
Method Detail
-
generateContiguous
public static AreaReference[] generateContiguous(String reference)
Takes a non-contiguous area reference, and
returns an array of contiguous area references.
-
getLastCell
public CellReference getLastCell()
Note - if this area reference refers to a single cell, the return value of this method will
be identical to that of getFirstCell()
- Returns:
- the second cell reference which defines this area. For multi-cell areas, this is
cell diagonally opposite the 'first cell'. Usually this cell is in the lower right corner
of the area (but this is not a requirement).
Copyright © 2020. All rights reserved.
|