Header menu logo FsSpreadsheet

FsTable Type

Creates an FsTable from the given name and FsRangeAddres, with totals row shown and header row shown or not, accordingly.

Constructors

Constructor Description

FsTable(name, rangeAddress, ?showTotalsRow, ?showHeaderRow)

Full Usage: FsTable(name, rangeAddress, ?showTotalsRow, ?showHeaderRow)

Parameters:
    name : string
    rangeAddress : FsRangeAddress
    ?showTotalsRow : bool
    ?showHeaderRow : bool

Returns: FsTable
name : string
rangeAddress : FsRangeAddress
?showTotalsRow : bool
?showHeaderRow : bool
Returns: FsTable

Instance members

Instance member Description

this.AddFields

Full Usage: this.AddFields

Parameters:

Adds a sequence of FsTableFields to the FsTable.

tableFields : FsTableField seq

this.Copy

Full Usage: this.Copy

Returns: FsTable

Creates a deep copy of this FsTable.

Returns: FsTable

this.Field

Full Usage: this.Field

Parameters:
Returns: FsTableField

Returns the FsTableField with given name. If an FsTableField does not exist under this name in the FsTable, adds it.

name : string
cellsCollection : FsCellsCollection
Returns: FsTableField

this.GetColumns

Full Usage: this.GetColumns

Parameters:
    cellsCollection : FsCellsCollection - The FsCellsCollection associated with this FsTable.

Returns: FsColumn seq

Returns the FsColumns from the FsTable.

cellsCollection : FsCellsCollection

The FsCellsCollection associated with this FsTable.

Returns: FsColumn seq

this.GetDataCellsOfColumnAt

Full Usage: this.GetDataCellsOfColumnAt

Parameters:
Returns: FsCell seq

Returns the data cells from a given FsCellsCollection with the given colum index.

Column index must fit the FsCellsCollection, not the FsTable!

cellsCollection : FsCellsCollection
colIndex : int32
Returns: FsCell seq

this.GetField

Full Usage: this.GetField

Parameters:
Returns: FsTableField

Takes a name of an FsTableField and an FsCellsCollection (belonging to the FsWorksheet of this FsTable) and returns the respective FsTableField.

name : string
cellsCollection : FsCellsCollection
Returns: FsTableField
ArgumentException if the header row has no field with the given name.

this.GetFieldAt

Full Usage: this.GetFieldAt

Parameters:
Returns: FsTableField

Takes the index of an FsTableField and an FsCellsCollection (belonging to the FsWorksheet of this FsTable) and returns the respective FsTableField.

index : int
cellsCollection : FsCellsCollection
Returns: FsTableField
ArgumentException if the FsTable has no FsTableField with the given index.

this.GetFieldIndex

Full Usage: this.GetFieldIndex

Parameters:
Returns: int

Takes a name of an FsTableField and an FsCellsCollection (belonging to the FsWorksheet of this FsTable) and returns the index of the respective FsTableField.

name : string
cellsCollection : FsCellsCollection
Returns: int
ArgumentException if the header row has no field with the given name.

this.GetFieldNames

Full Usage: this.GetFieldNames

Parameters:
Returns: Dictionary<string, FsTableField>

Returns all fieldnames as `fieldname*FsTableField` dictionary.

cellsCollection : FsCellsCollection
Returns: Dictionary<string, FsTableField>

this.GetFields

Full Usage: this.GetFields

Parameters:
Returns: FsTableField seq

The FsTableFields of this FsTable.

cellsCollection : FsCellsCollection
Returns: FsTableField seq

this.GetHeaderCellOfColumn

Full Usage: this.GetHeaderCellOfColumn

Parameters:
Returns: FsCell

Returns the header cell of a given FsRangeColumn from a given FsCellsCollection.

cellsCollection : FsCellsCollection
column : FsRangeColumn
Returns: FsCell
NullReferenceException if the FsCell cannot be found.

this.GetHeaderCellOfColumnAt

Full Usage: this.GetHeaderCellOfColumnAt

Parameters:
Returns: FsCell

Returns the header cell from a given FsCellsCollection with the given colum index.

cellsCollection : FsCellsCollection
colIndex : int
Returns: FsCell
NullReferenceException if the FsCell cannot be found.

this.GetHeaderCellOfTableField

Full Usage: this.GetHeaderCellOfTableField

Parameters:
Returns: FsCell

Returns the header cell of a given FsTableField from a given FsCellsCollection.

cellsCollection : FsCellsCollection
tableField : FsTableField
Returns: FsCell

this.GetHeaderCellOfTableFieldAt

Full Usage: this.GetHeaderCellOfTableFieldAt

Parameters:
Returns: FsCell

Returns the header cell from an FsTableField with the given index using a given FsCellsCollection.

cellsCollection : FsCellsCollection
tableFieldIndex : int
Returns: FsCell
NullReferenceException if the FsCell cannot be found.

this.GetHeaderRow

Full Usage: this.GetHeaderRow

Parameters:
Returns: FsRow
cellsCollection : FsCellsCollection
Returns: FsRow

this.GetRows

Full Usage: this.GetRows

Parameters:
    cellsCollection : FsCellsCollection - The FsCellsCollection associated with this FsTable.

Returns: FsRow seq

Returns the FsRows from the FsTable.

cellsCollection : FsCellsCollection

The FsCellsCollection associated with this FsTable.

Returns: FsRow seq

this.GetUniqueName

Full Usage: this.GetUniqueName

Parameters:
    originalName : string - Header name that was tried to be used.
    initialOffset : int32 - First number that together with the originalName, leads to a unique column header.
    enforceOffset : bool - If true, the initial offset is always applied.

Returns: string

Returns a unique name consisting of the original name and an initial offset that is raised if the original name with that offset is already present.

originalName : string

Header name that was tried to be used.

initialOffset : int32

First number that together with the originalName, leads to a unique column header.

enforceOffset : bool

If true, the initial offset is always applied.

Returns: string

this.InitFields

Full Usage: this.InitFields

Parameters:
    fieldNames : string seq

Creates and adds FsTableFields from a sequence of field names to the FsTable.

fieldNames : string seq

this.Name

Full Usage: this.Name

Returns: string

The name of the FsTable.

Returns: string

this.RenameField

Full Usage: this.RenameField

Parameters:
    oldName : string
    newName : string

Renames a fieldname of the FsTable if it exists. Else fails.

oldName : string
newName : string
ArgumentException if the FsTableField does not exist in the FsTable.

this.RescanFieldNames

Full Usage: this.RescanFieldNames

Parameters:

Updates the TableFields according to the range of the table and the underlying cellcollection. For this, maps over the range of the table and sets the header of the table fields to the value of the cell. If no cell value is set, the header value and the underlying cell value are set to a default value.

cellsCollection : FsCellsCollection

this.RescanRange

Full Usage: this.RescanRange

Updates the FsRangeAddress of the FsTable according to the FsTableFields associated.

this.ShowHeaderRow

Full Usage: this.ShowHeaderRow

Gets or sets if the header row is shown.

this.TryGetHeaderCellByFieldName

Full Usage: this.TryGetHeaderCellByFieldName

Parameters:
Returns: FsCell option

Returns the header cell from an FsTableField with the given name using an FsCellsCollection in the FsTable if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
fieldName : string
Returns: FsCell option

this.TryGetHeaderCellOfColumn

Full Usage: this.TryGetHeaderCellOfColumn

Parameters:
Returns: FsCell option

Returns the header cell of a given FsRangeColumn from a given FsCellsCollection if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
column : FsRangeColumn
Returns: FsCell option

this.TryGetHeaderCellOfColumnAt

Full Usage: this.TryGetHeaderCellOfColumnAt

Parameters:
Returns: FsCell option

Returns the header cell from a given FsCellsCollection with the given colum index if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
colIndex : int
Returns: FsCell option

this.TryGetHeaderCellOfTableFieldAt

Full Usage: this.TryGetHeaderCellOfTableFieldAt

Parameters:
Returns: FsCell option

Returns the header cell from an FsTableField with the given index using a given FsCellsCollection if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
tableFieldIndex : int
Returns: FsCell option

this.TryGetHeaderRow

Full Usage: this.TryGetHeaderRow

Parameters:
Returns: FsRow option
cellsCollection : FsCellsCollection
Returns: FsRow option

Static members

Static member Description

FsTable.addFields tableFields table

Full Usage: FsTable.addFields tableFields table

Parameters:
Returns: FsTable

Adds a sequence of FsTableFields to a given FsTable.

tableFields : FsTableField seq
table : FsTable
Returns: FsTable

FsTable.copy table

Full Usage: FsTable.copy table

Parameters:
Returns: FsTable

Returns a deep copy of a given FsTable.

table : FsTable
Returns: FsTable

FsTable.getDataCellsOfColumnIndexAt cellsCollection colIndex table

Full Usage: FsTable.getDataCellsOfColumnIndexAt cellsCollection colIndex table

Parameters:
Returns: FsCell seq

Returns the data cells from a given FsCellsCollection with the given colum index in a given FsTable.

Column index must fit the FsCellsCollection, not the FsTable!

cellsCollection : FsCellsCollection
colIndex : int
table : FsTable
Returns: FsCell seq

FsTable.getField name cellsCollection table

Full Usage: FsTable.getField name cellsCollection table

Parameters:
Returns: FsTableField

Takes a name of an FsTableField and an FsCellsCollection (belonging to the FsWorksheet of this FsTable) and returns the respective FsTableField.

name : string
cellsCollection : FsCellsCollection
table : FsTable
Returns: FsTableField
ArgumentException if the header row has no field with the given name.

FsTable.getHeaderCellOfColumn cellsCollection column table

Full Usage: FsTable.getHeaderCellOfColumn cellsCollection column table

Parameters:
Returns: FsCell

Returns the header cell of a given FsRangeColumn from a given FsCellsCollection in a given FsTable.

cellsCollection : FsCellsCollection
column : FsRangeColumn
table : FsTable
Returns: FsCell
NullReferenceException if the FsCell cannot be found.

FsTable.getHeaderCellOfColumnIndexAt cellsCollection colIndex table

Full Usage: FsTable.getHeaderCellOfColumnIndexAt cellsCollection colIndex table

Parameters:
Returns: FsCell

Returns the header cell from a given FsCellsCollection with the given colum index in a given FsTable.

cellsCollection : FsCellsCollection
colIndex : int
table : FsTable
Returns: FsCell
NullReferenceException if the FsCell cannot be found.

FsTable.getHeaderCellOfTableField cellsCollection tableField table

Full Usage: FsTable.getHeaderCellOfTableField cellsCollection tableField table

Parameters:
Returns: FsCell

Returns the header cell of a given FsTableField from a given FsCellsCollection in a given FsTable.

cellsCollection : FsCellsCollection
tableField : FsTableField
table : FsTable
Returns: FsCell

FsTable.getHeaderCellOfTableFieldIndexAt cellsCollection tableFieldIndex table

Full Usage: FsTable.getHeaderCellOfTableFieldIndexAt cellsCollection tableFieldIndex table

Parameters:
Returns: FsCell

Returns the header cell from an FsTableField with the given index using a given FsCellsCollection in a given FsTable.

cellsCollection : FsCellsCollection
tableFieldIndex : int
table : FsTable
Returns: FsCell
NullReferenceException if the FsCell cannot be found.

FsTable.getUniqueNames originalName initialOffset enforceOffset table

Full Usage: FsTable.getUniqueNames originalName initialOffset enforceOffset table

Parameters:
    originalName : string - Header name that was tried to be used.
    initialOffset : int32 - First number that together with the originalName, leads to a unique column header.
    enforceOffset : bool - If true, the initial offset is always applied.
    table : FsTable - The FsTable on which this function is called.

Returns: string

Returns a unique name consisting of the original name and an initial offset that is raised if the original name with that offset is already present.

originalName : string

Header name that was tried to be used.

initialOffset : int32

First number that together with the originalName, leads to a unique column header.

enforceOffset : bool

If true, the initial offset is always applied.

table : FsTable

The FsTable on which this function is called.

Returns: string

FsTable.initFields fieldNames table

Full Usage: FsTable.initFields fieldNames table

Parameters:
    fieldNames : string seq
    table : FsTable

Returns: FsTable

Creates and adds FsTableFields from a sequence of field names to a given FsTable.

fieldNames : string seq
table : FsTable
Returns: FsTable

FsTable.renameField oldName newName table

Full Usage: FsTable.renameField oldName newName table

Parameters:
    oldName : string
    newName : string
    table : FsTable

Returns: FsTable

Renames a fieldname of the FsTable if it exists. Else fails.

oldName : string
newName : string
table : FsTable
Returns: FsTable
ArgumentException if the FsTableField does not exist in the FsTable.

FsTable.rescanRange table

Full Usage: FsTable.rescanRange table

Parameters:
Returns: FsTable

Updates the FsRangeAddress of a given FsTable according to the FsTableFields associated.

table : FsTable
Returns: FsTable

FsTable.tryGetHeaderCellByFieldName cellsCollection fieldName table

Full Usage: FsTable.tryGetHeaderCellByFieldName cellsCollection fieldName table

Parameters:
Returns: FsCell option

Returns the header cell from an FsTableField with the given name using an FsCellsCollection in a given FsTable if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
fieldName : string
table : FsTable
Returns: FsCell option

FsTable.tryGetHeaderCellOfColumn cellsCollection column table

Full Usage: FsTable.tryGetHeaderCellOfColumn cellsCollection column table

Parameters:
Returns: FsCell option

Returns the header cell of a given FsRangeColumn from a given FsCellsCollection in a given FsTable if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
column : FsRangeColumn
table : FsTable
Returns: FsCell option

FsTable.tryGetHeaderCellOfColumnIndexAt cellsCollection colIndex table

Full Usage: FsTable.tryGetHeaderCellOfColumnIndexAt cellsCollection colIndex table

Parameters:
Returns: FsCell option

Returns the header cell from a given FsCellsCollection with the given column index in a given FsTable if the cell exists. Else returns None.

cellsCollection : FsCellsCollection
colIndex : int
table : FsTable
Returns: FsCell option

FsTable.tryGetHeaderCellOfTableFieldIndexAt cellsCollection tableFieldIndex table

Full Usage: FsTable.tryGetHeaderCellOfTableFieldIndexAt cellsCollection tableFieldIndex table

Parameters:
Returns: FsCell option

Returns the header cell from an FsTableField with the given index using a given FsCellsCollection if the cell exists in a given FsTable. Else returns None.

cellsCollection : FsCellsCollection
tableFieldIndex : int
table : FsTable
Returns: FsCell option

Type something to start searching.