org.apache.poi.hssf.util
Class ReferenceUtil
java.lang.Object
|
+--org.apache.poi.hssf.util.ReferenceUtil
- public class ReferenceUtil
- extends java.lang.Object
Handles conversion between A1= 0,0 (cell ref to numeric conversion)
- Author:
- Andrew C. Oliver (acoliver at apache dot org)
Method Summary |
static java.lang.String |
getReferenceFromXY(int row,
int col)
takes in a row and column and returns a string cellref |
static int[] |
getXYFromReference(java.lang.String reference)
takes in a cell reference string A1 for instance and returns an integer
array with the first element being the row number and the second being
the column number, all in 0-based base 10 format. |
static int[] |
getXYXYFromAreaRef(java.lang.String reference)
takes in a cell range and returns an array of integers x1,y1,x2,y2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getXYXYFromAreaRef
public static int[] getXYXYFromAreaRef(java.lang.String reference)
- takes in a cell range and returns an array of integers x1,y1,x2,y2
getXYFromReference
public static int[] getXYFromReference(java.lang.String reference)
- takes in a cell reference string A1 for instance and returns an integer
array with the first element being the row number and the second being
the column number, all in 0-based base 10 format.
- Parameters:
reference
- a cell reference such as A1 or AA1 or IV1- Returns:
- xyarray int array containing row and column number
getReferenceFromXY
public static java.lang.String getReferenceFromXY(int row,
int col)
- takes in a row and column and returns a string cellref
- Parameters:
row
- the 0 based row such as 0col
- the 0 based col number such as 1- Returns:
- cellreference string such as B1
Copyright © 2002 Apache jakarta-poi project. All Rights Reserved.