exceljs
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
archiver | 5.3.2 | 13.02 kB | MIT | prod | |
dayjs | 1.11.10 | 137.62 kB | MIT | prod | |
fast-csv | 4.3.6 | 2.84 kB | MIT | prod | |
jszip | 3.10.1 | 190.51 kB | (MIT OR GPL-3.0-or-later) | prod | |
readable-stream | 3.6.2 | 32.46 kB | MIT | prod | |
saxes | 5.0.1 | 35.04 kB | ISC | prod | |
tmp | 0.2.3 | 53.08 kB | MIT | prod | |
unzipper | 0.10.14 | 14.56 kB | MIT | prod | 1 2 2 |
uuid | 8.3.2 | 27.32 kB | MIT | prod |
ExcelJS is a powerful node module that allows developers to read, manipulate, and write spreadsheet data and styles to XLSX and JSON formats. As it is reverse engineered from Excel spreadsheet files, it provides broad compatibility with different versions of Excel and diverse spreadsheet structures.
To use ExcelJS, you first need to install it in your project directory using the Node Package Manager. You can do this by running the command npm install exceljs
in your terminal. Once installed, you can import it into your JavaScript file using the require
syntax like so:
const ExcelJS = require('exceljs');
One of the primary usages of ExcelJS is to create a new workbook. This can be accomplished with the following code:
const workbook = new ExcelJS.Workbook();
You can also add worksheets to your workbook:
const sheet = workbook.addWorksheet('My Sheet');
Subsequently, you can set workbook properties:
workbook.creator = 'Me';
workbook.lastModifiedBy = 'Her';
workbook.created = new Date(1985, 8, 30);
workbook.modified = new Date();
workbook.lastPrinted = new Date(2016, 9, 27);
Reading from, writing to, and manipulating spreadsheets and their data can be performed using the ExcelJS API's diverse methods and properties.
The complete documentation for ExcelJS, including detailed descriptions of its API, examples, and other useful information is located in the project's README file on the GitHub page for ExcelJS. This document will provide a comprehensive guide to fully understand and effectively use the ExcelJS package.