Exposes some cell reference helper methods to the public interface.
This class merely delegates to the internally used reference helper
getCellReference
public static void getCellReference(int column,
boolean colabs,
int row,
boolean rowabs,
StringBuffer buf)
Overloaded method which prepends $ for absolute reference
column
- the column numbercolabs
- TRUE if the column reference is absoluterow
- the row numberrowabs
- TRUE if the row reference is absolutebuf
- the string buffer
getCellReference
public static String getCellReference(int column,
int row)
Gets the cell reference for the specified column and row
column
- the columnrow
- the row
getCellReference
public static void getCellReference(int column,
int row,
StringBuffer buf)
Appends the cell reference for the column and row passed in to the string
buffer
column
- the columnrow
- the rowbuf
- the string buffer to append
getCellReference
public static void getCellReference(int sheet,
int column,
boolean colabs,
int row,
boolean rowabs,
Workbook workbook,
StringBuffer buf)
Gets the fully qualified cell reference given the column, row
external sheet reference etc
sheet
- the sheetcolumn
- the columncolabs
- TRUE if the column is an absolute referencerow
- the rowrowabs
- TRUE if the row is an absolute referenceworkbook
- the workbookbuf
- the string buffer
getCellReference
public static String getCellReference(int sheet,
int column,
int row,
Workbook workbook)
Gets the fully qualified cell reference given the column, row
external sheet reference etc
sheet
- the sheetcolumn
- the columnrow
- the rowworkbook
- the workbook
- the cell reference in the form 'Sheet 1'!A1
getCellReference
public static void getCellReference(int sheet,
int column,
int row,
Workbook workbook,
StringBuffer buf)
Gets the fully qualified cell reference given the column, row
external sheet reference etc
sheet
- the sheet indexcolumn
- the column indexrow
- the row indexworkbook
- the workbookbuf
- a string buffer
getCellReference
public static String getCellReference(int sheet,
int column,
int row,
WritableWorkbook workbook)
Gets the fully qualified cell reference given the column, row
external sheet reference etc
sheet
- the sheetcolumn
- the columnrow
- the rowworkbook
- the workbook
- the cell reference in the form 'Sheet 1'!A1
getCellReference
public static void getCellReference(int sheet,
int column,
int row,
WritableWorkbook workbook,
StringBuffer buf)
Gets the fully qualified cell reference given the column, row
external sheet reference etc
sheet
- the sheetcolumn
- the columnrow
- the rowworkbook
- the workbookbuf
- the buffer
getColumn
public static int getColumn(String s)
Gets the columnn number of the string cell reference
- the column portion of the cell reference
getColumnReference
public static String getColumnReference(int c)
Gets the column letter corresponding to the 0-based column number
- the letter for that column number
getRow
public static int getRow(String s)
Gets the row number of the cell reference
getSheet
public static String getSheet(String ref)
Gets the sheet name from the cell reference string
isColumnRelative
public static boolean isColumnRelative(String s)
Sees if the column component is relative or not
- TRUE if the column is relative, FALSE otherwise
isRowRelative
public static boolean isRowRelative(String s)
Sees if the row component is relative or not
- TRUE if the row is relative, FALSE otherwise