Skip to main content

Fable library for Spreadsheet creation and manipulation

Project description

FsSpreadsheet

Spreadsheet creation and manipulation in FSharp

DSL

#r "nuget: FsSpreadsheet"

open FsSpreadsheet.DSL

let dslTree = 

    workbook {
        sheet "MySheet" {
            row {
                cell {1}
                cell {2}
                cell {3}
            }
            row {
                4
                5
                6
            }
        }
    }


let spreadsheet = dslTree.Value.Parse()

ExcelIO

#r "nuget: FsSpreadsheet.ExcelIO"

open FsSpreadsheet.ExcelIO

spreadsheet.ToFile(excelFilePath)

------->

image

Code Examples

let tables = workbook.GetTables()
let worksheets = workbook.GetWorksheets()
// get worksheet and its table as tuple
let worksheetsAndTables =
tables
|> List.map (
    fun t ->
	let associatedWs = 
	    worksheets
	    |> List.find (
		fun ws -> 
		    ws.Tables
		    |> List.exists (fun t2 -> t2.Name = t.Name)
	    )
	associatedWs, t
)

Develop

Build QuickStart

If not already done,

  1. install .NET SDK
  2. install Node.js

In any shell, run

  1. dotnet tool restore
  2. npm install
  3. build.cmd <target> where <target> may be
    • if <target> is empty, it just runs dotnet build after cleaning everything
    • runtests to run unit tests
      • runtestsjs to only run JS unit tests
      • runtestsdotnet to only run .NET unit tests
    • releasenotes semver:<version> where <version> may be major, minor, or patch to update RELEASE_NOTES.md
    • pack to create a NuGet release
      • packprelease to create a NuGet prerelease
    • builddocs to create docs
      • builddocsprerelease to create prerelease docs
    • watchdocs to create docs and run them locally
    • watchdocsprelease to create prerelease docs and run them locally
    • publishnuget to create a NuGet release and publish it
      • publishnugetprelease to create a NuGet prerelease and publish it

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fsspreadsheet-5.2.0.tar.gz (183.0 kB view hashes)

Uploaded Source

Built Distribution

fsspreadsheet-5.2.0-py3-none-any.whl (237.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page