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
Contribution guidelines
- Make sure that all contributions run on all three languages: F#, Javascript and Python
- Please add failing tests prior to fixing a bug against which to code
- If applicable, include issue number in test name as such:
"worksOnFilledTable (issue #100)"
- If applicable, include issue number in test name as such:
- Make use of XML tags to comment your code as such:
/// <summary> /// Checks if there is an FsCell at given column index of a given FsRow. /// </summary> /// <param name="colIndex">The number of the column where the presence of an FsCell shall be checked.</param> /// <param name="row"></param> static member hasCellAt colIndex (row : FsRow) = row.HasCellAt colIndex
Metadata
Release files for fsspreadsheet 7.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fsspreadsheet-7.0.1.tar.gz | 121.0 kB | Without provenance | Details for fsspreadsheet-7.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fsspreadsheet-7.0.1-py3-none-any.whl | Python 3 | none | any | Details for fsspreadsheet-7.0.1-py3-none-any.whl |
Total release size: 304.2 kB
Release files / fsspreadsheet-7.0.1.tar.gz
| Download URL | fsspreadsheet-7.0.1.tar.gz |
|---|---|
| Size | 121.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b04ec5859635f7e7b0e58d1fff16db8c9b79f3c0a2e051e1dc8b7c6deab3b088
|
|
BLAKE2b-256 checksum How to use checksums |
a006ff7bff567be89c3462fd2df81c4faa62ae00d51e53812ff0af4991f7c115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Windows/11
|
Release files / fsspreadsheet-7.0.1-py3-none-any.whl
| Download URL | fsspreadsheet-7.0.1-py3-none-any.whl |
|---|---|
| Size | 183.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e91fa38c9792b9833a1fade1abc3a491866db4fdbd2b52624dae373be006167a
|
|
BLAKE2b-256 checksum How to use checksums |
2655224b3094fe84c1b8a60931562236b184d9fe4f0e3ba8964494f2d1f5b027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Windows/11
|
Security for fsspreadsheet 7.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.