@zenmrp/fortune-sheet-excel
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

FortuneSheetExcel

FortuneSheetExcel is an Excel import library for FortuneSheet. It only supports .xlsx format files (not .xls).

It is a FortuneSheet port of Luckyexcel.

Features

Supports the following spreadsheet features:

  • Cell style
  • Cell border
  • Cell format, such as number format, date, percentage, etc.
  • Formula

Usage

import { transformExcelToFortune } from 'FortuneSheetExcel';

// e.g. got a file input change event
const xls = await e.target.files[0].arrayBuffer()
const fsh = await transformExcelToFortune(xls)
setData(fsh.sheets) // use this as the Workbook data

Interactively in a node repl:

f = await (await import("node:fs/promises")).readFile('/home/val/Downloads/Silkscreen.xlsx')
console.log((await (await import("FortuneSheetExcel")).FortuneExcel.transformExcelToFortune(f)).toJsonString())
// in dev: console.log((await (await import("./dist/main.js")).FortuneExcel.transformExcelToFortune(f)).toJsonString())

Authors and acknowledgment

License

MIT

Package Sidebar

Install

npm i @zenmrp/fortune-sheet-excel

Weekly Downloads

34

Version

1.0.3

License

MIT

Unpacked Size

211 kB

Total Files

33

Last publish

Collaborators

  • valpackett
  • memonservices