UnionRange

Inheritance: java.lang.Object

public class UnionRange

Represents union range.

Methods

MethodDescription
applyStyle(Style style, StyleFlag flag)Applies formats for a whole range.
copy(UnionRange range, PasteOptions options)Copying the range with paste special options.
equals(Object arg0)
getCellCount()Gets all cell count in the range.
getClass()
getColumnCount()Gets the count of rows in the range.
getFirstColumn()Gets the index of the first column of the range.
getFirstRow()Gets the index of the first row of the range.
getHyperlinks()Gets all hyperlink in the range.
getName()Gets the name of the range.
getRangeCount()Gets the count of the ranges.
getRanges()Gets all union ranges.
getRefersTo()Gets the range’s refers to.
getRowCount()Gets the count of rows in the range.
getValue()Gets the values of the range.
hasRange()Indicates whether this has range.
hashCode()
intersect(Range[] ranges)Intersects another range.
intersect(UnionRange unionRange)Intersects another range.
intersect(String range)Intersects another range.
iterator()Gets the enumerator for cells in this Range.
merge()Combines a range of cells into a single cell.
notify()
notifyAll()
putValue(String stringValue, boolean isConverted, boolean 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.
setName(String value)Sets the name of the range.
setOutlineBorders(int borderStyle, Color borderColor)Sets the outline borders around a range of cells with same border style and color.
setOutlineBorders(int[] borderStyles, Color[] borderColors)Sets out line borders around a range of cells.
setStyle(Style style)Sets the style of the range.
setValue(Object value)Sets the values of the range.
toString()
unMerge()Unmerges merged cells of this range.
union(Range[] ranges)Union the ranges.
union(UnionRange unionRange)Union another range.
union(String range)Union another range.
wait()
wait(long arg0)
wait(long arg0, int arg1)

applyStyle(Style style, StyleFlag flag)

public void applyStyle(Style style, StyleFlag flag)

Applies formats for a whole range.

Remarks

Each cell in this range will contains a Style object. So this is a memory-consuming method. Please use it carefully.

Parameters:

ParameterTypeDescription
styleStyleThe style object which will be applied.
flagStyleFlagFlags which indicates applied formatting properties.

copy(UnionRange range, PasteOptions options)

public void copy(UnionRange range, PasteOptions options)

Copying the range with paste special options.

Parameters:

ParameterTypeDescription
rangeUnionRangeThe source range.
optionsPasteOptionsThe paste special options.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getCellCount()

public int getCellCount()

Gets all cell count in the range.

Returns: int

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColumnCount()

public int getColumnCount()

Gets the count of rows in the range.

Remarks

Only effects when it only contains one range.

Returns: int

getFirstColumn()

public int getFirstColumn()

Gets the index of the first column of the range.

Remarks

Only effects when it only contains one range.

Returns: int

getFirstRow()

public int getFirstRow()

Gets the index of the first row of the range.

Remarks

Only effects when it only contains one range.

Returns: int

public Hyperlink[] getHyperlinks()

Gets all hyperlink in the range.

Returns: com.aspose.cells.Hyperlink[]

getName()

public String getName()

Gets the name of the range.

Remarks

Named range is supported. For example,

range.Name = “Sheet1!MyRange”;

Returns: java.lang.String

getRangeCount()

public int getRangeCount()

Gets the count of the ranges.

Returns: int

getRanges()

public Range[] getRanges()

Gets all union ranges.

Returns: com.aspose.cells.Range[]

getRefersTo()

public String getRefersTo()

Gets the range’s refers to.

Returns: java.lang.String

getRowCount()

public int getRowCount()

Gets the count of rows in the range.

Remarks

Only effects when it only contains one range.

Returns: int

getValue()

public Object getValue()

Gets the values of the range.

Returns: java.lang.Object

hasRange()

public boolean hasRange()

Indicates whether this has range.

Returns: boolean

hashCode()

public native int hashCode()

Returns: int

intersect(Range[] ranges)

public UnionRange intersect(Range[] ranges)

Intersects another range.

Remarks

If the two union ranges are not intersected, returns null.

Parameters:

ParameterTypeDescription
rangesRange[]The range.

Returns: UnionRange

intersect(UnionRange unionRange)

public UnionRange intersect(UnionRange unionRange)

Intersects another range.

Remarks

If the two union ranges are not intersected, returns null.

Parameters:

ParameterTypeDescription
unionRangeUnionRangeThe range.

Returns: UnionRange

intersect(String range)

public UnionRange intersect(String range)

Intersects another range.

Remarks

If the two union ranges are not intersected, returns null.

Parameters:

ParameterTypeDescription
rangejava.lang.StringThe range.

Returns: UnionRange

iterator()

public Iterator iterator()

Gets the enumerator for cells in this Range.

Remarks

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: java.util.Iterator - The cells enumerator

merge()

public void merge()

Combines a range of cells into a single cell.

Remarks

Reference the merged cell via the address of the upper-left cell in the range.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

putValue(String stringValue, boolean isConverted, boolean setStyle)

public void putValue(String stringValue, boolean isConverted, boolean 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:

ParameterTypeDescription
stringValuejava.lang.StringInput value
isConvertedbooleanTrue: converted to other data type if appropriate.
setStylebooleanTrue: set the number format to cell’s style when converting to other data type

setName(String value)

public void setName(String value)

Sets the name of the range.

Remarks

Named range is supported. For example,

range.Name = “Sheet1!MyRange”;

Parameters:

ParameterTypeDescription
valuejava.lang.String

setOutlineBorders(int borderStyle, Color borderColor)

public void setOutlineBorders(int borderStyle, Color borderColor)

Sets the outline borders around a range of cells with same border style and color.

Parameters:

ParameterTypeDescription
borderStyleintCellBorderType. Border style.
borderColorColorBorder color.

setOutlineBorders(int[] borderStyles, Color[] borderColors)

public void setOutlineBorders(int[] borderStyles, Color[] borderColors)

Sets out line borders around a range of cells.

Remarks

Both the length of borderStyles and borderStyles must be 4. The order of borderStyles and borderStyles must be top,bottom,left,right

Parameters:

ParameterTypeDescription
borderStylesint[]CellBorderType. Border styles.
borderColorsColor[]Border colors.

setStyle(Style style)

public void setStyle(Style style)

Sets the style of the range.

Parameters:

ParameterTypeDescription
styleStyleThe Style object.

setValue(Object value)

public void setValue(Object value)

Sets the values of the range.

Parameters:

ParameterTypeDescription
valuejava.lang.Object

toString()

public String toString()

Returns: java.lang.String

unMerge()

public void unMerge()

Unmerges merged cells of this range.

union(Range[] ranges)

public UnionRange union(Range[] ranges)

Union the ranges.

Parameters:

ParameterTypeDescription
rangesRange[]The ranges.

Returns: UnionRange -

union(UnionRange unionRange)

public UnionRange union(UnionRange unionRange)

Union another range.

Parameters:

ParameterTypeDescription
unionRangeUnionRangeThe range.

Returns: UnionRange -

union(String range)

public UnionRange union(String range)

Union another range.

Parameters:

ParameterTypeDescription
rangejava.lang.StringThe range.

Returns: UnionRange -

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int