| Modifier and Type | Field and Description |
|---|---|
| private final CellReference | |
| private final boolean | |
| private final CellReference | |
| private final SpreadsheetVersion | |
| private static final char | CELL_DELIMITER
The character (:) that separates the two cell references in a multi-cell area reference |
| private static final SpreadsheetVersion | |
| private static final char | SHEET_NAME_DELIMITER
The character (!) that separates sheet names from cell references |
| private static final char | SPECIAL_NAME_DELIMITER
The character (') used to quote sheet names when they contain special characters |
| Access | Constructor and Description |
|---|---|
| public | AreaReference(String reference, SpreadsheetVersion version)
Create an area ref from a string representation. |
| public | AreaReference(CellReference topLeft, CellReference botRight, SpreadsheetVersion version)
Creates an area ref from a pair of Cell References. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the text representation of this area reference as it would appear in a formula.Returns a text representation of this area reference. |
| public static AreaReference[] | Returns: an array of contiguous area references.Takes a non-contiguous area reference, and returns an array of contiguous area references |
| public CellReference[] | |
| public CellReference | Returns: the first cell reference which defines this area. Usually this cell is in the upper left corner of the area (but this is not a requirement).
|
| public CellReference | 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).Note - if this area reference refers to a single cell, the return value of this method will
be identical to that of |
| public static AreaReference | Returns: An AreaReference that spans the given columnsIs the spreadsheet in format Excel97 or newer Excel versions version, String The ABC-based start-index of the columns start, String The ABC-based end-index of the columns end)Construct an AreaReference which spans one more columns. |
| public static AreaReference | Returns: An AreaReference that spans the given rowsIs the spreadsheet in format Excel97 or newer Excel versions version, String The 1-based start-index of the rows start, String The 1-based end-index of the rows end)Construct an AreaReference which spans one more rows |
| public static boolean | isContiguous(String reference)
Is the reference for a contiguous (i.e. unbroken) area, or is it made up of several different parts? |
| private static boolean | |
| public boolean | |
| public static boolean | isWholeColumnReference(SpreadsheetVersion version, CellReference topLeft, CellReference botRight)
Is the reference for a whole-column reference, such as C:C or D:G ? |
| public boolean | |
| private static String[] | Returns: array with one or two elements. nevernullSeparates Area refs in two parts and returns them as separate elements in a String array, each qualified with the sheet name (if present) |
| private static String[] | Returns: Area references in an array, size >= 1Area references, i.e. A1:B2, 'Sheet1'!A1:B2 reference)Splits a comma-separated area references string into an array of individual references |
| public String |
| _firstCell | back to summary |
|---|---|
| private final CellReference _firstCell | |
| _isSingleCell | back to summary |
|---|---|
| private final boolean _isSingleCell | |
| _lastCell | back to summary |
|---|---|
| private final CellReference _lastCell | |
| _version | back to summary |
|---|---|
| private final SpreadsheetVersion _version | |
| CELL_DELIMITER | back to summary |
|---|---|
| private static final char CELL_DELIMITER The character (:) that separates the two cell references in a multi-cell area reference | |
| DEFAULT_SPREADSHEET_VERSION | back to summary |
|---|---|
| private static final SpreadsheetVersion DEFAULT_SPREADSHEET_VERSION | |
| SHEET_NAME_DELIMITER | back to summary |
|---|---|
| private static final char SHEET_NAME_DELIMITER The character (!) that separates sheet names from cell references | |
| SPECIAL_NAME_DELIMITER | back to summary |
|---|---|
| private static final char SPECIAL_NAME_DELIMITER The character (') used to quote sheet names when they contain special characters | |
| AreaReference | back to summary |
|---|---|
| public AreaReference(String reference, SpreadsheetVersion version) 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. | |
| AreaReference | back to summary |
|---|---|
| public AreaReference(CellReference topLeft, CellReference botRight, SpreadsheetVersion version) Creates an area ref from a pair of Cell References. | |
| formatAsString | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public String formatAsString() Returns a text representation of this area reference. Example return values:
| |||||||||||
| generateContiguous | back to summary |
|---|---|
| public static AreaReference[] generateContiguous(SpreadsheetVersion version, String reference) Takes a non-contiguous area reference, and returns an array of contiguous area references
| |
| getAllReferencedCells | back to summary |
|---|---|
| public CellReference[] getAllReferencedCells() Returns a reference to every cell covered by this area | |
| getFirstCell | back to summary |
|---|---|
public CellReference getFirstCell()
| |
| getLastCell | back to summary |
|---|---|
| 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
| |
| getWholeColumn | back to summary |
|---|---|
| public static AreaReference getWholeColumn(SpreadsheetVersion version, String start, String end) Construct an AreaReference which spans one more columns. Columns are specified in the Excel format, i.e. "A" is the first column "B" the seconds, ... "AA", ..
| |
| getWholeRow | back to summary |
|---|---|
| public static AreaReference getWholeRow(SpreadsheetVersion version, String start, String end) Construct an AreaReference which spans one more rows
| |
| isContiguous | back to summary |
|---|---|
| public static boolean isContiguous(String reference) Is the reference for a contiguous (i.e.
unbroken) area, or is it made up of
several different parts?
(If it is, you will need to call
| |
| isPlainColumn | back to summary |
|---|---|
| private static boolean isPlainColumn(String refPart) | |
| isSingleCell | back to summary |
|---|---|
public boolean isSingleCell()
| |
| isWholeColumnReference | back to summary |
|---|---|
| public static boolean isWholeColumnReference(SpreadsheetVersion version, CellReference topLeft, CellReference botRight) Is the reference for a whole-column reference, such as C:C or D:G ? | |
| isWholeColumnReference | back to summary |
|---|---|
| public boolean isWholeColumnReference() | |
| separateAreaRefs | back to summary |
|---|---|
| private static String[] separateAreaRefs(String reference) Separates Area refs in two parts and returns them as separate elements in a String array, each qualified with the sheet name (if present)
| |
| splitAreaReferences | back to summary |
|---|---|
| private static String[] splitAreaReferences(String reference) Splits a comma-separated area references string into an array of individual references | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |