includes/org/apache/poi/ss/util/CellRangeAddress.java
public String formatAsString() {
        StringBuffer sb = new StringBuffer();
        CellReference cellRefFrom = new CellReference(getFirstRow(), getFirstColumn());
        CellReference cellRefTo = new CellReference(getLastRow(), getLastColumn());
        sb.append(cellRefFrom.formatAsString());
        //for a single-cell reference return A1 instead of A1:A1
        if(!cellRefFrom.equals(cellRefTo)){
            sb.append(':');
            sb.append(cellRefTo.formatAsString());
        }
        return sb.toString();
    }
/**
     * @return the text format of this range.  Single cell ranges are formatted
     *         like single cell references (e.g. 'A1' instead of 'A1:A1').
     */
@return the text format of this range.  Single cell ranges are formatted
like single cell references .
@return the text format of this range . Single cell ranges are formatted like single cell references .
public String formatAsString() {
        StringBuffer sb = new StringBuffer();
        CellReference cellRefFrom = new CellReference(getFirstRow(), getFirstColumn());
        CellReference cellRefTo = new CellReference(getLastRow(), getLastColumn());
        sb.append(cellRefFrom.formatAsString());
        if(!cellRefFrom.equals(cellRefTo)){
            sb.append(':');
            sb.append(cellRefTo.formatAsString());
        }
        return sb.toString();
    }
public String formatAsString ( ) { StringBuffer sb = new StringBuffer ( ) ; CellReference cellRefFrom = new CellReference ( getFirstRow ( ) , getFirstColumn ( ) ) ; CellReference cellRefTo = new CellReference ( getLastRow ( ) , getLastColumn ( ) ) ; sb . append ( cellRefFrom . formatAsString ( ) ) ; if ( ! cellRefFrom . equals ( cellRefTo ) ) { sb . append ( ':' ) ; sb . append ( cellRefTo . formatAsString ( ) ) ; } return sb . toString ( ) ; }
@return the text format of this range.
@return the text format of this range .
//for a single-cell reference return A1 instead of A1:A1
