UnionRange
Inheritance: java.lang.Object
public class UnionRange
Represents union range.
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
style | Style | The style object which will be applied. |
flag | StyleFlag | Flags 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:
Parameter | Type | Description |
---|---|---|
range | UnionRange | The source range. |
options | PasteOptions | The paste special options. |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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
getHyperlinks()
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:
Parameter | Type | Description |
---|---|---|
ranges | Range[] | 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:
Parameter | Type | Description |
---|---|---|
unionRange | UnionRange | The 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:
Parameter | Type | Description |
---|---|---|
range | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
stringValue | java.lang.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 |
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:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
borderStyle | int | CellBorderType. Border style. |
borderColor | Color | Border 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:
Parameter | Type | Description |
---|---|---|
borderStyles | int[] | CellBorderType. Border styles. |
borderColors | Color[] | Border colors. |
setStyle(Style style)
public void setStyle(Style style)
Sets the style of the range.
Parameters:
Parameter | Type | Description |
---|---|---|
style | Style | The Style object. |
setValue(Object value)
public void setValue(Object value)
Sets the values of the range.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
ranges | Range[] | The ranges. |
Returns: UnionRange -
union(UnionRange unionRange)
public UnionRange union(UnionRange unionRange)
Union another range.
Parameters:
Parameter | Type | Description |
---|---|---|
unionRange | UnionRange | The range. |
Returns: UnionRange -
union(String range)
public UnionRange union(String range)
Union another range.
Parameters:
Parameter | Type | Description |
---|---|---|
range | java.lang.String | The range. |
Returns: UnionRange -
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |