jxl.biff
Class CellReferenceHelper
java.lang.Object
|
+--jxl.biff.CellReferenceHelper
- public class CellReferenceHelper
- extends java.lang.Object
A helper to transform between excel cell references and
sheet:column:row notation
Because this function will be called when generating a string
representation of a formula, the cell reference will merely
be appened to the string buffer instead of returning a full
blooded string, for performance reasons
Field Summary |
private static char |
fixedInd
The character which indicates whether a reference is fixed |
Method Summary |
static java.lang.String |
getCellReference(int column,
int row)
Gets the cell reference for the specified column and row |
static void |
getCellReference(int sheet,
int column,
int row,
ExternalSheet workbook,
java.lang.StringBuffer buf)
Gets the fully qualified cell reference given the column, row
external sheet reference etc |
static void |
getCellReference(int column,
int row,
java.lang.StringBuffer buf)
|
static int |
getColumn(java.lang.String s)
Gets the columnn number of the string cell reference |
private static int |
getNumberIndex(java.lang.String s)
Finds the position where the first number occurs in the string |
static int |
getRow(java.lang.String s)
Gets the row number of the cell reference |
static boolean |
isColumnRelative(java.lang.String s)
Sees if the column component is relative or not |
static boolean |
isRowRelative(java.lang.String s)
Sees if the row component is relative or not |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
fixedInd
private static final char fixedInd
- The character which indicates whether a reference is fixed
CellReferenceHelper
public CellReferenceHelper()
getCellReference
public static void getCellReference(int column,
int row,
java.lang.StringBuffer buf)
getCellReference
public static void getCellReference(int sheet,
int column,
int row,
ExternalSheet workbook,
java.lang.StringBuffer buf)
- Gets the fully qualified cell reference given the column, row
external sheet reference etc
- Parameters:
sheet
- column
- row
- workbook
- buf
-
getCellReference
public static java.lang.String getCellReference(int column,
int row)
- Gets the cell reference for the specified column and row
- Parameters:
column
- row
- - Returns:
-
getColumn
public static int getColumn(java.lang.String s)
- Gets the columnn number of the string cell reference
- Parameters:
s
- the string to parse- Returns:
- the column portion of the cell reference
getRow
public static int getRow(java.lang.String s)
- Gets the row number of the cell reference
getNumberIndex
private static int getNumberIndex(java.lang.String s)
- Finds the position where the first number occurs in the string
isColumnRelative
public static boolean isColumnRelative(java.lang.String s)
- Sees if the column component is relative or not
- Parameters:
s
- - Returns:
- TRUE if the column is relative, FALSE otherwise
isRowRelative
public static boolean isRowRelative(java.lang.String s)
- Sees if the row component is relative or not
- Parameters:
s
- - Returns:
- TRUE if the row is relative, FALSE otherwise