public class UnionRange
extends java.lang.Object
implements java.lang.Iterable
| Modifier and Type | Method and Description |
|---|---|
void |
applyStyle(Style style,
StyleFlag flag)
Applies formats for a whole range.
|
void |
copy(UnionRange range,
PasteOptions options)
Copying the range with paste special options.
|
int |
getCellCount()
Gets all cell count in the range.
|
int |
getColumnCount()
Gets the count of rows in the range.
|
int |
getFirstColumn()
Gets the index of the first column of the range.
|
int |
getFirstRow()
Gets the index of the first row of the range.
|
Hyperlink[] |
getHyperlinks()
Gets all hyperlink in the range.
|
java.lang.String |
getName()
Gets the name of the range.
|
int |
getRangeCount()
Gets the count of the ranges.
|
Range[] |
getRanges()
Gets all union ranges.
|
java.lang.String |
getRefersTo()
Gets the range's refers to.
|
int |
getRowCount()
Gets the count of rows in the range.
|
java.lang.Object |
getValue()
Gets the values of the range.
|
boolean |
hasRange()
Indicates whether this has range.
|
UnionRange |
intersect(Range[] ranges)
Intersects another range.
|
UnionRange |
intersect(java.lang.String range)
Intersects another range.
|
UnionRange |
intersect(UnionRange unionRange)
Intersects another range.
|
java.util.Iterator |
iterator()
Gets the enumerator for cells in this Range.
|
void |
merge()
Combines a range of cells into a single cell.
|
void |
putValue(java.lang.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.
|
void |
setName(java.lang.String value)
Sets the name of the range.
|
void |
setOutlineBorders(int[] borderStyles,
Color[] borderColors)
Sets out line borders around a range of cells.
|
void |
setOutlineBorders(int borderStyle,
Color borderColor)
Sets the outline borders around a range of cells with same border style and color.
|
void |
setStyle(Style style)
Sets the style of the range.
|
void |
setValue(java.lang.Object value)
Sets the values of the range.
|
UnionRange |
union(Range[] ranges)
Union the ranges.
|
UnionRange |
union(java.lang.String range)
Union another range.
|
UnionRange |
union(UnionRange unionRange)
Union another range.
|
void |
unMerge()
Unmerges merged cells of this range.
|
public int getFirstRow()
Remarks
Only effects when it only contains one range.public int getFirstColumn()
Remarks
Only effects when it only contains one range.public int getRowCount()
Remarks
Only effects when it only contains one range.public int getColumnCount()
Remarks
Only effects when it only contains one range.public void merge()
Remarks
Reference the merged cell via the address of the upper-left cell in the range.public void unMerge()
public void putValue(java.lang.String stringValue,
boolean isConverted,
boolean setStyle)
stringValue - Input valueisConverted - True: converted to other data type if appropriate.setStyle - True: set the number format to cell's style when converting to other data typepublic java.lang.Object getValue()
public void setValue(java.lang.Object value)
public java.lang.String getName()
Remarks
Named range is supported. For example,range.Name = "Sheet1!MyRange";
public void setName(java.lang.String value)
Remarks
Named range is supported. For example,range.Name = "Sheet1!MyRange";
public java.lang.String getRefersTo()
public boolean hasRange()
public Hyperlink[] getHyperlinks()
public void setStyle(Style style)
style - The Style object.public void applyStyle(Style style, StyleFlag flag)
Remarks
Each cell in this range will contains aStyle object.
So this is a memory-consuming method. Please use it carefully.style - The style object which will be applied.flag - Flags which indicates applied formatting properties.public void copy(UnionRange range, PasteOptions options)
range - The source range.options - The paste special options.public java.util.Iterator iterator()
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).iterator in interface java.lang.Iterablepublic int getCellCount()
public int getRangeCount()
public Range[] getRanges()
public void setOutlineBorders(int[] borderStyles,
Color[] borderColors)
Remarks
Both the length of borderStyles and borderStyles must be 4. The order of borderStyles and borderStyles must be top,bottom,left,rightborderStyles - CellBorderType. Border styles.borderColors - Border colors.public void setOutlineBorders(int borderStyle,
Color borderColor)
borderStyle - CellBorderType. Border style.borderColor - Border color.public UnionRange intersect(java.lang.String range)
Remarks
If the two union ranges are not intersected, returns null.range - The range.public UnionRange intersect(UnionRange unionRange)
Remarks
If the two union ranges are not intersected, returns null.unionRange - The range.public UnionRange intersect(Range[] ranges)
Remarks
If the two union ranges are not intersected, returns null.ranges - The range.public UnionRange union(java.lang.String range)
range - The range.public UnionRange union(UnionRange unionRange)
unionRange - The range.public UnionRange union(Range[] ranges)
ranges - The ranges.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.