Header menu logo FsSpreadsheet

FsExtensions Module

Classes that extend the core FsSpreadsheet library with IO functionalities.

Type extensions

Type extension Description

this.AppendTablesToWorksheetPart

Full Usage: this.AppendTablesToWorksheetPart

Parameters:

Appends the FsTables of this FsWorksheet to a given OpenXmlWorksheetPart in an XlsxWorkbookPart.

Extended Type: FsWorksheet

xlsxlWorkbookPart : WorkbookPart
xlsxWorksheetPart : WorksheetPart

this.GetWorksheetOfTable

Full Usage: this.GetWorksheetOfTable

Parameters:
Returns: FsWorksheet

Returns the FsWorksheet associated with the FsTable in a given FsWorkbook.

Extended Type: FsTable

workbook : FsWorkbook
Returns: FsWorksheet

this.ToColumnsJsonFile

Full Usage: this.ToColumnsJsonFile

Parameters:
    path : string
    ?spaces : int
    ?noNumbering : bool

Extended Type: FsWorkbook

path : string
?spaces : int
?noNumbering : bool

this.ToColumnsJsonString

Full Usage: this.ToColumnsJsonString

Parameters:
    ?spaces : int
    ?noNumbering : bool

Returns: string

Extended Type: FsWorkbook

?spaces : int
?noNumbering : bool
Returns: string

this.ToEmptySpreadsheet

Full Usage: this.ToEmptySpreadsheet

Parameters:

Extended Type: FsWorkbook

doc : SpreadsheetDocument

this.ToRowsJsonFile

Full Usage: this.ToRowsJsonFile

Parameters:
    path : string
    ?spaces : int
    ?noNumbering : bool

Extended Type: FsWorkbook

path : string
?spaces : int
?noNumbering : bool

this.ToRowsJsonString

Full Usage: this.ToRowsJsonString

Parameters:
    ?spaces : int
    ?noNumbering : bool

Returns: string

Extended Type: FsWorkbook

?spaces : int
?noNumbering : bool
Returns: string

this.ToXlsxBytes

Full Usage: this.ToXlsxBytes

Parameters:
    () : unit

Returns: byte[]

Returns the FsWorkbook in the form of a byte array.

Extended Type: FsWorkbook

() : unit
Returns: byte[]

this.ToXlsxFile

Full Usage: this.ToXlsxFile

Parameters:
    path : string

Writes the FsWorkbook into a binary file at the given path.

Extended Type: FsWorkbook

path : string

this.ToXlsxStream

Full Usage: this.ToXlsxStream

Parameters:

Writes the FsWorkbook into a given MemoryStream.

Extended Type: FsWorkbook

stream : MemoryStream

this.ToXlsxTable

Full Usage: this.ToXlsxTable

Parameters:
Returns: Table

Returns the FsTable with given FsCellsCollection in the form of an XlsxTable.

Extended Type: FsTable

cells : FsCellsCollection
Returns: Table

this.ToXlsxWorksheet

Full Usage: this.ToXlsxWorksheet

Parameters:
Returns: Worksheet

Returns the FsWorksheet in the form of an XlsxSpreadsheet.

Extended Type: FsWorksheet

doc : SpreadsheetDocument
Returns: Worksheet

FsWorksheet.appendTablesToWorksheetPart xlsxWorkbookPart xlsxWorksheetPart fsWorksheet

Full Usage: FsWorksheet.appendTablesToWorksheetPart xlsxWorkbookPart xlsxWorksheetPart fsWorksheet

Parameters:

Appends the FsTables of an FsWorksheet to a given OpenXmlWorksheetPart in an XlsxWorkbookPart.

Extended Type: FsWorksheet

xlsxWorkbookPart : WorkbookPart
xlsxWorksheetPart : WorksheetPart
fsWorksheet : FsWorksheet

FsWorkbook.fromColumnsJsonFile filePath

Full Usage: FsWorkbook.fromColumnsJsonFile filePath

Parameters:
    filePath : string

Returns: FsWorkbook

Takes the path to an json file and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

filePath : string
Returns: FsWorkbook

FsWorkbook.fromColumnsJsonString json

Full Usage: FsWorkbook.fromColumnsJsonString json

Parameters:
    json : string

Returns: FsWorkbook

Takes a json string and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

json : string
Returns: FsWorkbook

FsWorkbook.fromPackage package

Full Usage: FsWorkbook.fromPackage package

Parameters:
Returns: FsWorkbook

Creates an FsWorkbook from a given Packaging.Package xlsx package.

Extended Type: FsWorkbook

package : Package
Returns: FsWorkbook

FsWorkbook.fromRowsJsonFile filePath

Full Usage: FsWorkbook.fromRowsJsonFile filePath

Parameters:
    filePath : string

Returns: FsWorkbook

Takes the path to an json file and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

filePath : string
Returns: FsWorkbook

FsWorkbook.fromRowsJsonString json

Full Usage: FsWorkbook.fromRowsJsonString json

Parameters:
    json : string

Returns: FsWorkbook

Takes a json string and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

json : string
Returns: FsWorkbook

FsWorkbook.fromSpreadsheetDocument doc

Full Usage: FsWorkbook.fromSpreadsheetDocument doc

Parameters:
Returns: FsWorkbook

Creates an FsWorkbook from a given SpreadsheetDocument.

Extended Type: FsWorkbook

doc : SpreadsheetDocument
Returns: FsWorkbook

FsWorkbook.fromXlsxBytes bytes

Full Usage: FsWorkbook.fromXlsxBytes bytes

Parameters:
    bytes : byte[]

Returns: FsWorkbook

Creates an FsWorkbook from a given Stream to an XlsxFile.

Extended Type: FsWorkbook

bytes : byte[]
Returns: FsWorkbook

FsWorkbook.fromXlsxFile filePath

Full Usage: FsWorkbook.fromXlsxFile filePath

Parameters:
    filePath : string

Returns: FsWorkbook

Takes the path to an Xlsx file and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

filePath : string
Returns: FsWorkbook

FsWorkbook.fromXlsxStream stream

Full Usage: FsWorkbook.fromXlsxStream stream

Parameters:
Returns: FsWorkbook

Creates an FsWorkbook from a given Stream to an XlsxFile.

Extended Type: FsWorkbook

stream : Stream
Returns: FsWorkbook

FsTable.fromXlsxTable table

Full Usage: FsTable.fromXlsxTable table

Parameters:
Returns: FsTable

Takes an XlsxTable and returns an FsTable.

Extended Type: FsTable

table : Table
Returns: FsTable

FsTable.getWorksheetOfTable workbook table

Full Usage: FsTable.getWorksheetOfTable workbook table

Parameters:
Returns: FsWorksheet

Returns the FsWorksheet associated with a given FsTable in an FsWorkbook.

Extended Type: FsTable

workbook : FsWorkbook
table : FsTable
Returns: FsWorksheet

DataType.ofXlsXCell doc cell

Full Usage: DataType.ofXlsXCell doc cell

Parameters:
Returns: DataType

Converts a given CellValues to the respective DataType.

Extended Type: DataType

doc : SpreadsheetDocument
cell : Cell
Returns: DataType

FsCell.ofXlsxCell doc sst xlsxCell

Full Usage: FsCell.ofXlsxCell doc sst xlsxCell

Parameters:
Returns: FsCell

Creates an FsCell on the basis of an XlsxCell. Uses a SharedStringTable if present to get the XlsxCell's value.

Extended Type: FsCell

doc : SpreadsheetDocument
sst : SST option
xlsxCell : Cell
Returns: FsCell

FsWorkbook.toColumnsJsonFile (path, ?spaces, ?noNumbering)

Full Usage: FsWorkbook.toColumnsJsonFile (path, ?spaces, ?noNumbering)

Parameters:
    path : string
    ?spaces : int
    ?noNumbering : bool

Returns: FsWorkbook -> unit

Extended Type: FsWorkbook

path : string
?spaces : int
?noNumbering : bool
Returns: FsWorkbook -> unit

FsWorkbook.toColumnsJsonString (workbook, ?spaces, ?noNumbering)

Full Usage: FsWorkbook.toColumnsJsonString (workbook, ?spaces, ?noNumbering)

Parameters:
    workbook : FsWorkbook
    ?spaces : int
    ?noNumbering : bool

Returns: string

Extended Type: FsWorkbook

workbook : FsWorkbook
?spaces : int
?noNumbering : bool
Returns: string

FsWorkbook.toRowsJsonFile (path, ?spaces, ?noNumbering)

Full Usage: FsWorkbook.toRowsJsonFile (path, ?spaces, ?noNumbering)

Parameters:
    path : string
    ?spaces : int
    ?noNumbering : bool

Returns: FsWorkbook -> unit

Extended Type: FsWorkbook

path : string
?spaces : int
?noNumbering : bool
Returns: FsWorkbook -> unit

FsWorkbook.toRowsJsonString (workbook, ?spaces, ?noNumbering)

Full Usage: FsWorkbook.toRowsJsonString (workbook, ?spaces, ?noNumbering)

Parameters:
    workbook : FsWorkbook
    ?spaces : int
    ?noNumbering : bool

Returns: string

Extended Type: FsWorkbook

workbook : FsWorkbook
?spaces : int
?noNumbering : bool
Returns: string

FsWorkbook.toXlsxBytes workbook

Full Usage: FsWorkbook.toXlsxBytes workbook

Parameters:
Returns: byte[]

Returns an FsWorkbook in the form of a byte array.

Extended Type: FsWorkbook

workbook : FsWorkbook
Returns: byte[]

FsCell.toXlsxCell doc cell

Full Usage: FsCell.toXlsxCell doc cell

Parameters:
Returns: Cell

Extended Type: FsCell

doc : SpreadsheetDocument
cell : FsCell
Returns: Cell

FsWorkbook.toXlsxFile path workbook

Full Usage: FsWorkbook.toXlsxFile path workbook

Parameters:

Writes an FsWorkbook into a binary file at the given path.

Extended Type: FsWorkbook

path : string
workbook : FsWorkbook

FsWorkbook.toXlsxStream stream workbook

Full Usage: FsWorkbook.toXlsxStream stream workbook

Parameters:

Writes an FsWorkbook into a given MemoryStream.

Extended Type: FsWorkbook

stream : MemoryStream
workbook : FsWorkbook

FsTable.toXlsxTable cellsCollection table

Full Usage: FsTable.toXlsxTable cellsCollection table

Parameters:
Returns: Table

Returns an FsTable with given FsCellsCollection in the form of an XlsxTable.

Extended Type: FsTable

cellsCollection : FsCellsCollection
table : FsTable
Returns: Table

FsWorksheet.toXlsxWorksheet (fsWorksheet, doc)

Full Usage: FsWorksheet.toXlsxWorksheet (fsWorksheet, doc)

Parameters:
Returns: Worksheet

Returns an FsWorksheet in the form of an XlsxSpreadsheet.

Extended Type: FsWorksheet

fsWorksheet : FsWorksheet
doc : SpreadsheetDocument
Returns: Worksheet

FsWorkbook.tryFromColumnsJsonFile filePath

Full Usage: FsWorkbook.tryFromColumnsJsonFile filePath

Parameters:
    filePath : string

Returns: Result<FsWorkbook, string>

Takes the path to an json file and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

filePath : string
Returns: Result<FsWorkbook, string>

FsWorkbook.tryFromColumnsJsonString json

Full Usage: FsWorkbook.tryFromColumnsJsonString json

Parameters:
    json : string

Returns: Result<FsWorkbook, string>

Takes a json string and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

json : string
Returns: Result<FsWorkbook, string>

FsWorkbook.tryFromRowsJsonFile filePath

Full Usage: FsWorkbook.tryFromRowsJsonFile filePath

Parameters:
    filePath : string

Returns: Result<FsWorkbook, string>

Takes the path to an json file and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

filePath : string
Returns: Result<FsWorkbook, string>

FsWorkbook.tryFromRowsJsonString json

Full Usage: FsWorkbook.tryFromRowsJsonString json

Parameters:
    json : string

Returns: Result<FsWorkbook, string>

Takes a json string and returns the FsWorkbook based on its content.

Extended Type: FsWorkbook

json : string
Returns: Result<FsWorkbook, string>

FsCell.tryOfXlsxCell doc sst xlsxCell

Full Usage: FsCell.tryOfXlsxCell doc sst xlsxCell

Parameters:
Returns: FsCell option

Creates an FsCell on the basis of an XlsxCell. Uses a SharedStringTable if present to get the XlsxCell's value.

Extended Type: FsCell

doc : SpreadsheetDocument
sst : SST option
xlsxCell : Cell
Returns: FsCell option

Type something to start searching.