asposecells.api

Class UnionRange

Represents union range.

Property Getters/Setters Summary
methodgetCellCount()
Gets all cell count in the range.
methodgetColumnCount()
Gets the count of rows in the range.
methodgetFirstColumn()
Gets the index of the first column of the range.
methodgetFirstRow()
Gets the index of the first row of the range.
methodhasRange()
Indicates whether this has range.
methodgetHyperlinks()
Gets all hyperlink in the range.
methodgetName()
method
setName(value)
           Gets or sets the name of the range.
methodgetRangeCount()
Gets the count of the ranges.
methodgetRanges()
Gets all union ranges.
methodgetRefersTo()
Gets the range's refers to.
methodgetRowCount()
Gets the count of rows in the range.
methodgetValue()
method
setValue(value)
           Gets and sets the values of the range.
 
Method Summary
methodapplyStyle(style, flag)
Applies formats for a whole range.
methodcopy(range, options)
Copying the range with paste special options.
methodintersect(ranges)
Intersects another range.
methodintersect(unionRange)
Intersects another range.
methodintersect(range)
Intersects another range.
methoditerator()
Gets the enumerator for cells in this Range.
methodmerge()
Combines a range of cells into a single cell.
methodputValue(stringValue, isConverted, setStyle)
Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset.
methodsetOutlineBorders(borderStyle, borderColor)
Sets the outline borders around a range of cells with same border style and color.
methodsetOutlineBorders(borderStyles, borderColors)
Sets out line borders around a range of cells.
methodsetStyle(style)
Sets the style of the range.
methodunion(ranges)
Union the ranges.
methodunion(unionRange)
Union another range.
methodunion(range)
Union another range.
methodunMerge()
Unmerges merged cells of this range.
 

    • Property Getters/Setters Detail

      • getFirstRow : int 

        int getFirstRow()
        
        Gets the index of the first row of the range. Only effects when it only contains one range.
      • getFirstColumn : int 

        int getFirstColumn()
        
        Gets the index of the first column of the range. Only effects when it only contains one range.
      • getRowCount : int 

        int getRowCount()
        
        Gets the count of rows in the range. Only effects when it only contains one range.
      • getColumnCount : int 

        int getColumnCount()
        
        Gets the count of rows in the range. Only effects when it only contains one range.
      • getValue/setValue : Object 

        Object getValue() / setValue(value)
        
        Gets and sets the values of the range.
      • getName/setName : String 

        String getName() / setName(value)
        
        Gets or sets the name of the range. Named range is supported. For example,

        range.Name = "Sheet1!MyRange";

      • getRefersTo : String 

        String getRefersTo()
        
        Gets the range's refers to.
      • hasRange : boolean 

        boolean hasRange()
        
        Indicates whether this has range.
      • getHyperlinks : Hyperlink[] 

        Hyperlink[] getHyperlinks()
        
        Gets all hyperlink in the range.
      • getCellCount : int 

        int getCellCount()
        
        Gets all cell count in the range.
      • getRangeCount : int 

        int getRangeCount()
        
        Gets the count of the ranges.
      • getRanges : Range[] 

        Range[] getRanges()
        
        Gets all union ranges.
    • Method Detail

      • merge

         merge()
        Combines a range of cells into a single cell. Reference the merged cell via the address of the upper-left cell in the range.
      • unMerge

         unMerge()
        Unmerges merged cells of this range.
      • putValue

         putValue(stringValue, isConverted, setStyle)
        Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset.
        Parameters:
        stringValue: String - Input value
        isConverted: boolean - True: converted to other data type if appropriate.
        setStyle: boolean - True: set the number format to cell's style when converting to other data type
      • setStyle

         setStyle(style)
        Sets the style of the range.
        Parameters:
        style: Style - The Style object.
      • applyStyle

         applyStyle(style, flag)
        Applies formats for a whole range. Each cell in this range will contains a Style object. So this is a memory-consuming method. Please use it carefully.
        Parameters:
        style: Style - The style object which will be applied.
        flag: StyleFlag - Flags which indicates applied formatting properties.
      • copy

         copy(range, options)
        Copying the range with paste special options.
        Parameters:
        range: UnionRange - The source range.
        options: PasteOptions - The paste special options.
      • iterator

        Iterator iterator()
        Gets the enumerator for cells in this Range. When traversing elements by the returned Enumerator, the cells collection should not be modified(such as operations that will cause new Cell/Row be instantiated or existing Cell/Row be deleted). Otherwise the enumerator may not be able to traverse all cells correctly(some elements may be traversed repeatedly or skipped).
        Returns:
        The cells enumerator
      • setOutlineBorders

         setOutlineBorders(borderStyles, borderColors)
        Sets out line borders around a range of cells. Both the length of borderStyles and borderStyles must be 4. The order of borderStyles and borderStyles must be top,bottom,left,right
        Parameters:
        borderStyles: Number Array - Border styles.
        borderColors: Color[] - Border colors.
      • setOutlineBorders

         setOutlineBorders(borderStyle, borderColor)
        Sets the outline borders around a range of cells with same border style and color.
        Parameters:
        borderStyle: int - A CellBorderType value. Border style.
        borderColor: Color - Border color.
      • intersect

        UnionRange intersect(range)
        Intersects another range. If the two union ranges are not intersected, returns null.
        Parameters:
        range: String - The range.
      • intersect

        UnionRange intersect(unionRange)
        Intersects another range. If the two union ranges are not intersected, returns null.
        Parameters:
        unionRange: UnionRange - The range.
      • intersect

        UnionRange intersect(ranges)
        Intersects another range. If the two union ranges are not intersected, returns null.
        Parameters:
        ranges: Range[] - The range.
      • union

        UnionRange union(range)
        Union another range.
        Parameters:
        range: String - The range.
        Returns:
      • union

        UnionRange union(unionRange)
        Union another range.
        Parameters:
        unionRange: UnionRange - The range.
        Returns:
      • union

        UnionRange union(ranges)
        Union the ranges.
        Parameters:
        ranges: Range[] - The ranges.
        Returns: