com.acesoft.aceoffix
Class ExcelRect

java.lang.Object
  extended by com.acesoft.aceoffix.ExcelRect

public class ExcelRect
extends java.lang.Object

ExcelRect class is used to help developers to validate and parse A1-style reference.

Version:
3.0
Author:
Acesoft Corporation

Field Summary
 int bottom
          End index of row.
 int left
          Start index of column.
 int right
          End index of column.
 int top
          Start index of row.
 
Constructor Summary
ExcelRect(java.lang.String rangeAddress)
          Initializes a new instance of the ExcelRect class with the specified rangeAddress.
 
Method Summary
static boolean cellAddressIsValid(java.lang.String cellAddress)
          Static method.
 boolean isValid()
          Determines whether the rangeAddress specified in constructor is valid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

public int left
Start index of column.


top

public int top
Start index of row.


right

public int right
End index of column.


bottom

public int bottom
End index of row.

Constructor Detail

ExcelRect

public ExcelRect(java.lang.String rangeAddress)
          throws java.lang.Exception,
                 java.io.IOException
Initializes a new instance of the ExcelRect class with the specified rangeAddress.

Parameters:
rangeAddress - The rangeAddress represents a range of cells containing one contiguous block of cells and it must use A1-style notation.

The A1-style notation is defined in Microsoft Excel. For example: A1:F8, it means a range of cells A1 through F8. The A1 cell is the cell whose row index is 1 and column index is 1. The F8 cell is the cell whose row index is 8 and column index is 6.

Note: There is a limit that the maximum number of columns per worksheet is 256 and the maximum number of rows is 65,536 in Excel2003 and earlier versions.

Throws:
java.lang.Exception
java.io.IOException
Method Detail

isValid

public boolean isValid()
Determines whether the rangeAddress specified in constructor is valid. Return true if the specified rangeAddress is valid; otherwise, false.


cellAddressIsValid

public static boolean cellAddressIsValid(java.lang.String cellAddress)
Static method. Returns whether the given cellAddress is valid. Return true if the specified CellAddress is valid; otherwise, false.

Parameters:
cellAddress - The cellAddress represents a single cell and it must use A1-style notation.

The A1-style notation is defined in Microsoft Excel. For example: the B5 cell is the cell whose row index is 5 and column index is 2.

Note: There is a limit that the maximum number of columns per worksheet is 256 and the maximum number of rows is 65,536 in Excel2003 and earlier versions.