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 runteststo run unit testsruntestsjsto only run JS unit testsruntestsdotnetto only run .NET unit testsruntestpyto only run Python unit tests
releasenotes semver:<version>where<version>may bemajor,minor, orpatchto update RELEASE_NOTES.mdpackto create a NuGet releasepackpreleaseto create a NuGet prerelease
builddocsto create docsbuilddocsprereleaseto create prerelease docs
watchdocsto create docs and run them locallywatchdocspreleaseto create prerelease docs and run them locallyreleaseto create a NuGet, NPM, PyPI and GitHub release
- if
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fsspreadsheet-6.3.0.tar.gz.
File metadata
- Download URL: fsspreadsheet-6.3.0.tar.gz
- Upload date:
- Size: 184.0 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 |
e27ab3949120936aae9047887fac9fcb34ef51d64f2f5cf780e1d87b216dc8c2
|
|
| MD5 |
7633fffe18e843aef072a895ca3c244c
|
|
| BLAKE2b-256 |
2f1048e4d84b8e5796bd0c931e122726f175329a64921dbc66a54833a5027d0f
|
File details
Details for the file fsspreadsheet-6.3.0-py3-none-any.whl.
File metadata
- Download URL: fsspreadsheet-6.3.0-py3-none-any.whl
- Upload date:
- Size: 254.5 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 |
060408d0af987e1b468fd4a81f4f875c516eacaf02b8bd862fc9f5a5968ee097
|
|
| MD5 |
761a1d198c1a2025845efe955326fb2c
|
|
| BLAKE2b-256 |
a67da3ad0f83ee8509f7146cd00b82e15992e8f003fa57edfc15a41203323f78
|