Class RangesCollection
- Namespace
- Spire.Xls.Collections
- Assembly
- Spire.XLS.dll
public class RangesCollection : XlsRangesCollection, IList<IXLSRange>, ICollection<IXLSRange>, ICloneParent, IEnumerable<IXLSRange>, IXLSRanges, ICombinedRange, IXLSRange, IExcelApplication, IEnumerable
- Inheritance
-
RangesCollection
- Implements
- Inherited Members
Properties
Borders
Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format).
public BordersCollection Borders { get; }
Property Value
Cells
Returns a Range object that represents the cells in the specified range.
public CellRange[] Cells { get; }
Property Value
Columns
Returns a Range object that represents the columns in the specified range
public CellRange[] Columns { get; }
Property Value
Comment
Returns a Comment object that represents the comment associated with the cell in the upper-left corner of the range.
public ExcelComment Comment { get; }
Property Value
EndCell
Returns a Range object that represents the cell at the end of the region that contains the source range.
public CellRange EndCell { get; }
Property Value
EntireColumn
Returns a Range object that represents the entire column (or columns) that contains the specified range.
public RangesCollection EntireColumn { get; }
Property Value
EntireRow
Returns a Range object that represents the entire row (or rows) that contains the specified range.
public RangesCollection EntireRow { get; }
Property Value
MergeArea
Returns a Range object that represents the merged range containing the specified cell.
public RangesCollection MergeArea { get; }
Property Value
RichText
Returns a RichTextString object that represents the rich text style.
public RichText RichText { get; }
Property Value
Rows
Returns the number of the first row of the first area in the range.
public CellRange[] Rows { get; }
Property Value
Style
Returns a Style object that represents the style of the specified range
public CellStyle Style { get; set; }
Property Value
Worksheet
public Worksheet Worksheet { get; }
Property Value
Methods
Add(CellRange)
Adds a range to the collection.
public void Add(CellRange range)
Parameters
range
CellRangeRange to add.
AddComment()
Adds a comment to the range.
public ExcelComment AddComment()
Returns
- ExcelComment
Added comment.
AddRange(CellRange)
Adds a range to the collection.
public void AddRange(CellRange range)
Parameters
range
CellRangeRange to add.
Copy(CellRange)
Copies the range to the specified range.
public CellRange Copy(CellRange destRange)
Parameters
destRange
CellRangeDestination range
Returns
- CellRange
Destination range
Copy(CellRange, bool)
Copies the range to the specified range.
public CellRange Copy(CellRange destRange, bool updateReference)
Parameters
Returns
Copy(CellRange, bool, bool)
Copies the range to the specified range.
public CellRange Copy(CellRange destRange, bool updateReference, bool copyStyles)
Parameters
destRange
CellRangeDestination range.
updateReference
boolIndicates whether to update reference cells.
copyStyles
boolIndicates whether to copy styles.
Returns
- CellRange
Destination range
FindAllBool(bool)
Finds the cell with the input bool.
public CellRange[] FindAllBool(bool boolValue)
Parameters
boolValue
boolBool value to search for
Returns
- CellRange[]
Found ranges
FindAllDateTime(DateTime)
Finds the cell with the input datetime.
public CellRange[] FindAllDateTime(DateTime dateTimeValue)
Parameters
dateTimeValue
DateTimeDateTime value to search for
Returns
- CellRange[]
Found ranges
FindAllNumber(double, bool)
Finds the cell with the input double.
public CellRange[] FindAllNumber(double doubleValue, bool formulaValue)
Parameters
doubleValue
doubleDouble value to search for
formulaValue
boolIndicates whether to find formula value
Returns
- CellRange[]
Found ranges
FindAllString(string, bool, bool)
Finds the cell with the input string.
public CellRange[] FindAllString(string stringValue, bool formula, bool formulaValue)
Parameters
stringValue
stringString value to search for
formula
boolIndicates whether include formula
formulaValue
boolIndicates whether include formula value
Returns
- CellRange[]
Found ranges
FindAllTimeSpan(TimeSpan)
Finds the cell with input timespan
public CellRange[] FindAllTimeSpan(TimeSpan timeSpanValue)
Parameters
timeSpanValue
TimeSpantime span value to search for
Returns
- CellRange[]
Found ranges
FindBool(bool)
Finds the cell with the input bool.
public CellRange FindBool(bool boolValue)
Parameters
boolValue
boolBool value to search for
Returns
- CellRange
Found range
FindDateTime(DateTime)
Finds the cell with the input datetime.
public CellRange FindDateTime(DateTime dateTimeValue)
Parameters
dateTimeValue
DateTimeDatetime value to search for
Returns
- CellRange
Found range
FindNumber(double, bool)
Finds the cell with the input double.
public CellRange FindNumber(double doubleValue, bool formulaValue)
Parameters
doubleValue
doubleDouble value to search for
formulaValue
boolIndicates whether includes formula value to search for
Returns
- CellRange
Found range
FindString(string, bool, bool)
Finds the cell with the input string.
public CellRange FindString(string stringValue, bool formula, bool formulaValue)
Parameters
stringValue
stringString value to search for
formula
boolIndicates whether includes formula to search for
formulaValue
boolIndicates whether includes formula value to search for
Returns
- CellRange
Found range
FindTimeSpan(TimeSpan)
Finds the cell with the input time span.
public CellRange FindTimeSpan(TimeSpan timeSpanValue)
Parameters
timeSpanValue
TimeSpanTime span value to search for.
Returns
- CellRange
Found range.
Intersect(CellRange)
Get intersection range with the specified range.
public CellRange Intersect(CellRange range)
Parameters
range
CellRangeRange which to intersect.
Returns
- CellRange
Range intersection.
Move(CellRange)
Moves the cells to the specified Range.
public void Move(CellRange destRange)
Parameters
destRange
CellRange
Move(CellRange, bool)
Moves the cells to the specified Range.
public void Move(CellRange destRange, bool updateReference)
Parameters
Remove(CellRange)
Removes range from the collection.
public void Remove(CellRange range)
Parameters
range
CellRangeRange to remove.