Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class ExcelHelper

java.lang.Object
  extended by com.aspose.cells.ExcelHelper

public class ExcelHelper
extends java.lang.Object

Contains helper static functions.


Method Summary
static java.lang.String convertCellIndexToName(int rowIndex, int columnIndex)
          Gets the cell name corresponds to it's row index and column index.
static int[] convertCellNameToIndex(java.lang.String cellName)
          Gets the row index and column index of a cell corresponds to it's name.
static java.lang.String convertColumnIndexToName(int columnIndex)
          Gets the column name corresponds to the column index.
static int convertColumnNameToIndex(java.lang.String columnName)
          Gets the column index corresponds to the column name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertColumnNameToIndex

public static int convertColumnNameToIndex(java.lang.String columnName)
Gets the column index corresponds to the column name.

Parameters:
columnName - column name, like "A".
Returns:
column index.
Throws:
java.lang.IllegalArgumentException - if the column name is invalid.

convertColumnIndexToName

public static java.lang.String convertColumnIndexToName(int columnIndex)
Gets the column name corresponds to the column index.

Parameters:
columnIndex - column index.
Returns:
column name.
Throws:
java.lang.IllegalArgumentException - if the column index is out of range.

convertCellIndexToName

public static java.lang.String convertCellIndexToName(int rowIndex,
                                                      int columnIndex)
Gets the cell name corresponds to it's row index and column index.

Parameters:
rowIndex - row index of the cell.
columnIndex - column index of the cell.
Returns:
cell name.
Throws:
java.lang.IllegalArgumentException - if any of the indexes is out of range.

convertCellNameToIndex

public static int[] convertCellNameToIndex(java.lang.String cellName)
Gets the row index and column index of a cell corresponds to it's name.

Parameters:
cellName - cell name.
Returns:
an int array. The row index is stored at index 0 and the column index is stored at index 1.
Throws:
java.lang.IllegalArgumentException - if the cell name is invalid.