Package jxl
Class CellReferenceHelper
java.lang.Object
jxl.CellReferenceHelper
Exposes some cell reference helper methods to the public interface.
This class merely delegates to the internally used reference helper
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
getCellReference
(int column, boolean colabs, int row, boolean rowabs, StringBuffer buf) Overloaded method which prepends $ for absolute referencestatic String
getCellReference
(int column, int row) Gets the cell reference for the specified column and rowstatic 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 etcstatic String
getCellReference
(int sheet, int column, int row, Workbook workbook) Gets the fully qualified cell reference given the column, row external sheet reference etcstatic 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 etcstatic String
getCellReference
(int sheet, int column, int row, WritableWorkbook workbook) Gets the fully qualified cell reference given the column, row external sheet reference etcstatic 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 etcstatic void
getCellReference
(int column, int row, StringBuffer buf) Appends the cell reference for the column and row passed in to the string bufferstatic String
Gets the cell reference for the cellstatic void
getCellReference
(Cell c, StringBuffer sb) Gets the cell reference for the cellstatic int
Gets the columnn number of the string cell referencestatic String
getColumnReference
(int c) Gets the column letter corresponding to the 0-based column numberstatic int
Gets the row number of the cell referencestatic String
Gets the sheet name from the cell reference stringstatic boolean
Sees if the column component is relative or notstatic boolean
Sees if the row component is relative or not
-
Method Details
-
getCellReference
Appends the cell reference for the column and row passed in to the string buffer- Parameters:
column
- the columnrow
- the rowbuf
- the string buffer to append
-
getCellReference
public static void getCellReference(int column, boolean colabs, int row, boolean rowabs, StringBuffer buf) Overloaded method which prepends $ for absolute reference- Parameters:
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
Gets the cell reference for the specified column and row- Parameters:
column
- the columnrow
- the row- Returns:
- the cell reference
-
getColumn
Gets the columnn number of the string cell reference- Parameters:
s
- the string to parse- Returns:
- the column portion of the cell reference
-
getColumnReference
Gets the column letter corresponding to the 0-based column number- Parameters:
c
- the column number- Returns:
- the letter for that column number
-
getRow
Gets the row number of the cell reference- Parameters:
s
- the cell reference- Returns:
- the row number
-
isColumnRelative
Sees if the column component is relative or not- Parameters:
s
- the cell- Returns:
- TRUE if the column is relative, FALSE otherwise
-
isRowRelative
Sees if the row component is relative or not- Parameters:
s
- the cell- Returns:
- TRUE if the row is relative, FALSE otherwise
-
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- Parameters:
sheet
- the sheet indexcolumn
- the column indexrow
- the row indexworkbook
- the workbookbuf
- a string buffer
-
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- Parameters:
sheet
- the sheetcolumn
- the columnrow
- the rowworkbook
- the workbookbuf
- the buffer
-
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- Parameters:
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
Gets the fully qualified cell reference given the column, row external sheet reference etc- Parameters:
sheet
- the sheetcolumn
- the columnrow
- the rowworkbook
- the workbook- Returns:
- the cell reference in the form 'Sheet 1'!A1
-
getCellReference
Gets the fully qualified cell reference given the column, row external sheet reference etc- Parameters:
sheet
- the sheetcolumn
- the columnrow
- the rowworkbook
- the workbook- Returns:
- the cell reference in the form 'Sheet 1'!A1
-
getSheet
Gets the sheet name from the cell reference string- Parameters:
ref
- the cell reference- Returns:
- the sheet name
-
getCellReference
Gets the cell reference for the cell- Parameters:
the
- cell
-
getCellReference
Gets the cell reference for the cell- Parameters:
c
- the cellsb
- string buffer
-