Interface IXLRanges
public interface IXLRanges : IEnumerable<IXLRange>, IEnumerable
- Inherited Members
- Extension Methods
Properties
Count
int Count { get; }
Property Value
Style
IXLStyle Style { get; set; }
Property Value
Value
Sets the cells' value.
Setter will clear a formula, if the cell contains a formula. If the value is a text that starts with a single quote, setter will prefix the value with a single quote through IncludeQuotePrefix in Excel too and the value of cell is set to to non-quoted text.
XLCellValue Value { set; }
Property Value
Methods
Add(IXLCell)
void Add(IXLCell range)
Parameters
rangeIXLCell
Add(IXLRangeBase)
Adds the specified range to this group.
void Add(IXLRangeBase range)
Parameters
rangeIXLRangeBaseThe range to add to this group.
AddToNamed(string)
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
The default scope for the named range is Workbook.
IXLRanges AddToNamed(string rangeName)
Parameters
rangeNamestringName of the range.
Returns
AddToNamed(string, XLScope)
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
Name of the range. The scope for the named range.IXLRanges AddToNamed(string rangeName, XLScope scope)
Parameters
Returns
AddToNamed(string, XLScope, string)
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
Name of the range. The scope for the named range. The comments for the named range.IXLRanges AddToNamed(string rangeName, XLScope scope, string comment)
Parameters
Returns
Cells()
Returns the collection of cells.
IXLCells Cells()
Returns
CellsUsed()
Returns the collection of cells that have a value.
IXLCells CellsUsed()
Returns
CellsUsed(XLCellsUsedOptions)
Returns the collection of cells that have a value.
IXLCells CellsUsed(XLCellsUsedOptions options)
Parameters
optionsXLCellsUsedOptionsThe options to determine whether a cell is used.
Returns
Clear(XLClearOptions)
Clears the contents of these ranges.
IXLRanges Clear(XLClearOptions clearOptions = XLClearOptions.All)
Parameters
clearOptionsXLClearOptionsSpecify what you want to clear.
Returns
Consolidate()
Create a new collection of ranges which are consolidated version of source ranges.
IXLRanges Consolidate()
Returns
Contains(IXLRange)
bool Contains(IXLRange range)
Parameters
rangeIXLRange
Returns
CreateDataValidation()
Creates a new data validation rule for the ranges collection, replacing the existing ones.
IXLDataValidation CreateDataValidation()
Returns
GetIntersectedRanges(IXLAddress)
Filter ranges from a collection that intersect the specified address. Is much more efficient that using Linq expression .Where().
IEnumerable<IXLRange> GetIntersectedRanges(IXLAddress address)
Parameters
addressIXLAddress
Returns
GetIntersectedRanges(IXLCell)
Filter ranges from a collection that intersect the specified cell. Is much more efficient that using Linq expression .Where().
IEnumerable<IXLRange> GetIntersectedRanges(IXLCell cell)
Parameters
cellIXLCell
Returns
GetIntersectedRanges(IXLRangeAddress)
Filter ranges from a collection that intersect the specified address. Is much more efficient that using Linq expression .Where().
IEnumerable<IXLRange> GetIntersectedRanges(IXLRangeAddress rangeAddress)
Parameters
rangeAddressIXLRangeAddress
Returns
Remove(IXLRange)
Removes the specified range from this group.
bool Remove(IXLRange range)
Parameters
rangeIXLRangeThe range to remove from this group.
Returns
RemoveAll(Predicate<IXLRange>?, bool)
Removes ranges matching the criteria from the collection, optionally releasing their event handlers.
void RemoveAll(Predicate<IXLRange>? match = null, bool releaseEventHandlers = true)
Parameters
matchPredicate<IXLRange>Criteria to filter ranges. Only those ranges that satisfy the criteria will be removed. Null means the entire collection should be cleared.
releaseEventHandlersboolSpecify whether or not should removed ranges be unsubscribed from row/column shifting events. Until ranges are unsubscribed they cannot be collected by GC.
Select()
void Select()
SetDataValidation()
[Obsolete("Use CreateDataValidation() instead.")]
IXLDataValidation SetDataValidation()
Returns
SetValue(XLCellValue)
IXLRanges SetValue(XLCellValue value)
Parameters
valueXLCellValue