An easy way of building Excel files with javascript
npm install excel-builder-vanillaš Documentation website powered by GitBook
Available Live demo which displays a rough WYSIWYG (What You See Is What You Get) idea of all available options/methods.
``sh`
npm install excel-builder-vanilla
The project only offers 1 bundle type
- ESM: to import from (preferred)
`ts`
// ESM - npm install
import { createWorksheet } from 'excel-builder-vanilla';
`ts
import { downloadExcelFile, Workbook } from 'excel-builder-vanilla';
const originalData = [
['Artist', 'Album', 'Price'],
['Buckethead', 'Albino Slug', 8.99],
['Buckethead', 'Electric Tears', 13.99],
['Buckethead', 'Colma', 11.34],
];
const artistWorkbook = new Workbook();
const albumList = artistWorkbook.createWorksheet({ name: 'Artists' });
albumList.setData(originalData);
artistWorkbook.addWorksheet(albumList);
downloadExcelFile(artistWorkbook, 'Artist WB.xlsx');
`
library)$3
- build as ESM-Only and drop CJS (CommonJS) build (aka require())$3
- drop the legacy IIFE build and the use of window object (typically used when loading as the legacy