Table of Contents

Interface IXLBaseCollection<TSingle, TMultiple>

Namespace
SlapKit.Excel.Excel
Assembly
SlapKit.Excel.dll
public interface IXLBaseCollection<TSingle, TMultiple> : IEnumerable<TSingle>, IEnumerable

Type Parameters

TSingle
TMultiple
Inherited Members
Extension Methods

Properties

Count

int Count { get; }

Property Value

int

Style

IXLStyle Style { get; set; }

Property Value

IXLStyle

Value

Sets the cells' value.

If the object is an IEnumerable SlapKit.Excel will copy the collection's data into a table starting from each cell.

If the object is a range SlapKit.Excel will copy the range starting from each cell.

Setting the value to an object (not IEnumerable/range) will call the object's ToString() method.

SlapKit.Excel will try to translate it to the corresponding type, if it can't then the value will be left as a string.

object Value { set; }

Property Value

object

The object containing the value(s) to set.

Methods

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.

TMultiple AddToNamed(string rangeName)

Parameters

rangeName string

Name of the range.

Returns

TMultiple

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.
TMultiple AddToNamed(string rangeName, XLScope scope)

Parameters

rangeName string
scope XLScope

Returns

TMultiple

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.
TMultiple AddToNamed(string rangeName, XLScope scope, string comment)

Parameters

rangeName string
scope XLScope
comment string

Returns

TMultiple

Cells()

Returns the collection of cells.

IXLCells Cells()

Returns

IXLCells

CellsUsed()

Returns the collection of cells that have a value.

IXLCells CellsUsed()

Returns

IXLCells

CellsUsed(bool)

Returns the collection of cells that have a value.

IXLCells CellsUsed(bool includeFormats)

Parameters

includeFormats bool

if set to true will return all cells with a value or a style different than the default.

Returns

IXLCells

Clear(XLClearOptions)

Clears the contents of these ranges.

TMultiple Clear(XLClearOptions clearOptions = XLClearOptions.All)

Parameters

clearOptions XLClearOptions

Specify what you want to clear.

Returns

TMultiple

SetDataType(XLDataType)

TMultiple SetDataType(XLDataType dataType)

Parameters

dataType XLDataType

Returns

TMultiple

SetDataValidation()

IXLDataValidation SetDataValidation()

Returns

IXLDataValidation

SetValue<T>(T)

TMultiple SetValue<T>(T value)

Parameters

value T

Returns

TMultiple

Type Parameters

T