FsSpreadsheet Documentation
FsSpreadsheet is a library for reading and writing spreadsheets in F#, Javascript and Python using Fable. It is a wrapper of the Python library openpyxl (https://openpyxl.readthedocs.io/en/stable/) and the Javascript library exceljs (https://www.npmjs.com/package/@nfdi4plants/exceljs).
Installation
F#
Project
|
Script
#r "nuget: FsSpreadsheet.Net"
open FsSpreadsheet
open FsSpreadsheet.Net
Javascript
|
Python
|
Usage_Xlsx_IO
F#
open FsSpreadsheet
open FsSpreadsheet.Net
let path = "path/to/spreadsheet.xlsx"
let wb = FsWorkbook.fromXlsxFile(path)
let newPath = "path/to/new/spreadsheet.xlsx"
wb.ToXlsxFile(newPath)
Javascript
|
Python
|
Usage_Json_IO
F#
open FsSpreadsheet
open FsSpreadsheet.Net
let path = "path/to/spreadsheet.json"
let wb = FsWorkbook.fromJsonFile(path)
let newPath = "path/to/new/spreadsheet.json"
wb.ToJsonFile(newPath)
Javascript
|
Python
|
namespace FsSpreadsheet
namespace FsSpreadsheet.Net
val path: string
val wb: FsWorkbook
Multiple items
type FsWorkbook = interface IDisposable new: unit -> FsWorkbook member AddWorksheet: sheet: FsWorksheet -> unit member AddWorksheets: sheets: FsWorksheet seq -> unit member Copy: unit -> FsWorkbook member GetTables: unit -> FsTable array member GetWorksheetAt: index: int -> FsWorksheet member GetWorksheetByName: sheetName: string -> FsWorksheet member GetWorksheets: unit -> ResizeArray<FsWorksheet> member InitWorksheet: name: string -> FsWorksheet ...
<summary> Creates an empty FsWorkbook. </summary>
--------------------
new: unit -> FsWorkbook
type FsWorkbook = interface IDisposable new: unit -> FsWorkbook member AddWorksheet: sheet: FsWorksheet -> unit member AddWorksheets: sheets: FsWorksheet seq -> unit member Copy: unit -> FsWorkbook member GetTables: unit -> FsTable array member GetWorksheetAt: index: int -> FsWorksheet member GetWorksheetByName: sheetName: string -> FsWorksheet member GetWorksheets: unit -> ResizeArray<FsWorksheet> member InitWorksheet: name: string -> FsWorksheet ...
<summary> Creates an empty FsWorkbook. </summary>
--------------------
new: unit -> FsWorkbook
static member FsWorkbook.fromXlsxFile: filePath: string -> FsWorkbook
val newPath: string
member FsWorkbook.ToXlsxFile: path: string -> unit