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).
Project
dotnet add package FsSpreadsheet.Net
|
Script
#r "nuget: FsSpreadsheet.Net"
open FsSpreadsheet
open FsSpreadsheet.Net
npm install @fslab/fsspreadsheet
|
pip install fsspreadsheet
|
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)
import { Xlsx } from '@fslab/fsspreadsheet/Xlsx.js';
const path = "path/to/spreadsheet.xlsx"
const wb = Xlsx.fromXlsxFile(path)
const newPath = "path/to/new/spreadsheet.xlsx"
Xlsx.toXlsxFile(newPath,wb)
|
from fsspreadsheet.xlsx import Xlsx
path = "path/to/spreadsheet.xlsx"
wb = Xlsx.from_xlsx_file(path)
newPath = "path/to/new/spreadsheet.xlsx"
Xlsx.to_xlsx_file(newPath,wb)
|
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)
import { Json } from '@fslab/fsspreadsheet/Json.js';
const path = "path/to/spreadsheet.json"
const wb = Json.fromJsonFile(path)
const newPath = "path/to/new/spreadsheet.json"
Json.toJsonFile(newPath,wb)
|
from fsspreadsheet.json import Json
path = "path/to/spreadsheet.json"
wb = Json.from_json_file(path)
newPath = "path/to/new/spreadsheet.json"
Json.to_json_file(newPath,wb)
|