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


Constructor Summary
CellReferenceHelper()
           
 
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
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

CellReferenceHelper

public CellReferenceHelper()
Method Detail

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