Fable library for Spreadsheet creation and manipulation
Project description
FsSpreadsheet
Spreadsheet creation and manipulation in FSharp
Latest Release | Downloads | Target |
---|---|---|
Python | ||
JavaScript | ||
.NET | ||
Fable JavaScript | ||
Fable Python |
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.Net"
open FsSpreadsheet.Net
spreadsheet.ToFile(excelFilePath)
------->
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
)
Development
Requirements
- nodejs and npm
- verify with
node --version
(Tested with v18.16.1) - verify with
npm --version
(Tested with v9.2.0)
- verify with
- .NET SDK
- verify with
dotnet --version
(Tested with 7.0.306)
- verify with
- Python
- verify with
py --version
(Tested with 3.12.2)
- verify with
Local Setup
-
Setup dotnet tools
dotnet tool restore
-
Install NPM dependencies
npm install
-
Setup python environment
py -m venv .venv
-
Install Poetry and dependencies
.\.venv\Scripts\python.exe -m pip install -U pip setuptools
.\.venv\Scripts\python.exe -m pip install poetry
.\.venv\Scripts\python.exe -m poetry install --no-root
Verify correct setup with ./build.cmd runtests
build.cmd <target>
where<target>
may be- if
<target>
is empty, it just runs dotnet build after cleaning everything runtests
to run unit testsruntestsjs
to only run JS unit testsruntestsdotnet
to only run .NET unit testsruntestpy
to only run Python unit tests
releasenotes semver:<version>
where<version>
may bemajor
,minor
, orpatch
to update RELEASE_NOTES.mdpack
to create a NuGet releasepackprelease
to create a NuGet prerelease
builddocs
to create docsbuilddocsprerelease
to create prerelease docs
watchdocs
to create docs and run them locallywatchdocsprelease
to create prerelease docs and run them locallyrelease
to create a NuGet, NPM, PyPI and GitHub release
- if
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-6.2.0.tar.gz
(223.1 kB
view details)
Built Distribution
fsspreadsheet-6.2.0-py3-none-any.whl
(301.2 kB
view details)
File details
Details for the file fsspreadsheet-6.2.0.tar.gz
.
File metadata
- Download URL: fsspreadsheet-6.2.0.tar.gz
- Upload date:
- Size: 223.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2015e12e877e879bccaccb5157b8a73607ea774b8605caf165efe3a62f238194 |
|
MD5 | 6d62c69e818aecc139a8c68f2e743e92 |
|
BLAKE2b-256 | f459caa5b7505a66802ca1b8666d8e6c278f086f5aa98d1214c6a60ca9573552 |
File details
Details for the file fsspreadsheet-6.2.0-py3-none-any.whl
.
File metadata
- Download URL: fsspreadsheet-6.2.0-py3-none-any.whl
- Upload date:
- Size: 301.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 468fb01188e50f4044efdda0aaaaac0f70d6dae3d8cfe0c8f9c06515ab5ea921 |
|
MD5 | 2d22363b679b26f2c6b2022e89647f4a |
|
BLAKE2b-256 | 323c79fb48b28b9de01bbb0cee295f2eac4c6b65da5ffc6ebbc3ee6d79e76741 |