Installations
npm install excel-builder-vanilla
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
20.17.0
NPM Version
lerna/3.9.3/node@v20.17.0+x64 (linux)
Score
79.2
Supply Chain
82.7
Quality
83.1
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
TypeScript (80.58%)
HTML (16.63%)
SCSS (2.39%)
JavaScript (0.39%)
Developer
Download Statistics
Total Downloads
36,970
Last Day
85
Last Week
710
Last Month
3,454
Last Year
36,970
GitHub Statistics
7 Stars
318 Commits
2 Forks
2 Watching
2 Branches
2 Contributors
Bundle Size
75.31 kB
Minified
22.79 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
3.0.14
Package Id
excel-builder-vanilla@3.0.14
Unpacked Size
747.26 kB
Size
186.08 kB
File Count
42
NPM Version
lerna/3.9.3/node@v20.17.0+x64 (linux)
Node Version
20.17.0
Publised On
13 Oct 2024
Total Downloads
Cumulative downloads
Total Downloads
36,970
Last day
-73.1%
85
Compared to previous day
Last week
-42.3%
710
Compared to previous week
Last month
8%
3,454
Compared to previous month
Last year
0%
36,970
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Excel-Builder-Vanilla
Documentation
š Documentation website powered by GitBook (previous project docs were pulled from web archive)
Description
This lib allows you to build and write an Excel file dynamically, it does not include any reader capabilities making the library super lightweight.
Live Demo
Visit the Live demo to get started and see all available options and methods that the library offers.
You can also take a look at the "Used by" section below to see real world applications taking advantage of this library.
Changelog
LICENSE
Project History
Excel-Builder-Vanilla is a fork of the popular excel-builder.js project (thanks to @stephenliberty for this great library). The main goal of creating this fork was to modernize the project by removing old dependencies that are no longer necessary and also replace JSZip
by fflate
which provides an ESM build and is indirectly giving us better Tree Shaking. The other goal was also to provide an ESM build to eventually get away from CommonJS (CJS bundle is still offered but we strongly suggest that you migrate to the ESM approach)
The modernization steps:
- migrate to TypeScript (which is giving us TS Types
d.ts
) - drop
Q
dependency (we now simply use nativePromise
) - drop
Lodash
dependency (we now use native JS code) - replace
JSZip
dependency withfflate
which has an ESM build and offers better performance. - bump version to
v3.0.0
as amajor
release (the original project version was in the2.x
range.)- note that the changelog did not exists prior to
v3.0.0
- note that the changelog did not exists prior to
The project now requires only 1 dependency which is fflate.
Summary
This modernization is providing a huge decrease in the final build size, with only 1 dependency, and also offers better performance š
Installation
1npm install excel-builder-vanilla
The project offers 3 different build types, choose the best one depending on your use case
- ESM: to
import from
(preferred) - CJS: CommonJS to support old NodeJS
require()
- will probably be dropped in the future - IIFE: standalone script which provides
ExcelBuilder
on thewindow
object
1// ESM (preferred) - npm install 2import { createWorksheet } from 'excel-builder-vanilla'; 3 4// CJS - npm install 5const { createWorksheet } = require('excel-builder-vanilla'); 6 7// IIFE - CDN 8<script src="https://cdn.jsdelivr.net/npm/excel-builder-vanilla@3.0.1/dist/excel-builder.iife.js"></script> 9<script> 10 const worksheet = ExcelBuilder.createWorksheet(); // or window.ExcelBuilder.createWorksheet(); 11</script>
CSP (Content Security Policy)
Please note that since we use fflate
(which creates and compresses the Excel file before sending it to the browser), you might get some CSP errors because of its use of Web Workers. For that reason, you might need to adjust your CSP rules by adding worker-src 'self' blob:;
1<meta http-equiv="Content-Security-Policy" 2 content="default-src 'self'; 3 // other rules... 4 worker-src 'self' blob:;" />
Used by
This fork was created mostly to support Tree Shaking (ESM), to get away from CJS, to provide TS Types and finally to update all project dependencies. It is used by a few other Open Source libraries that I also maintain and require Excel export:
Contributions
Pull Request are welcome, feel free to contribute.
Development / Contributions
If you wish to contribute to the project, please follow the steps below:
Note: this project uses pnpm workspaces, you can install pnpm by following their installation or use NodeJS corepack enable
to run any of the pnpm scripts shown below:
- clone the lib:
git clone https://github.com/ghiscoding/excel-builder-vanilla
- install it with pnpm from the project root:
pnpm install
ORnpx pnpm install
- run a full TypeScript build
pnpm run build
ORnpx pnpm run build
- run in development mode (lib & demo)
pnpm run dev
ORnpx pnpm run dev
Pull Request Contribution
Before submitting a PR (pull request), please make sure that you followed these steps for a better chance of a successfull PR:
- make sure that you have already executed
pnpm install
- run the Biome lint npm script (or simply use step 4)
pnpm run biome:lint:write
- run the Biome code formatting npm script (or simply use step 4)
pnpm run biome:format:write
- run a full Build (this will also run Biome lint/format, so you could skip step 2)
pnpm run build
Packages
Package Name | NPM downloads | Size (gzip) | Changes | Description |
---|---|---|---|---|
excel-builder-vanilla | changelog | excel-builder-vanilla library package | ||
excel-builder-vanilla-types | changelog | excel-builder-vanilla dts types only package. |
Sponsors
No vulnerabilities found.
No security vulnerabilities found.