Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

excel4node

Package Overview
Dependencies
Maintainers
3
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

excel4node

Library to create Formatted Excel Files.

  • 1.8.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is excel4node?

The excel4node npm package is a powerful tool for creating and manipulating Excel files in Node.js. It allows developers to generate Excel spreadsheets with various formatting options, styles, and data types. The package is particularly useful for applications that need to export data to Excel format, such as reporting tools, data analysis applications, and more.

What are excel4node's main functionalities?

Creating a Workbook and Worksheet

This feature allows you to create a new Excel workbook and add a worksheet to it. The code sample demonstrates how to create a workbook, add a worksheet named 'Sheet 1', and save the workbook as 'ExcelFile.xlsx'.

const xl = require('excel4node');
const wb = new xl.Workbook();
const ws = wb.addWorksheet('Sheet 1');
wb.write('ExcelFile.xlsx');

Adding Data to Cells

This feature allows you to add data to specific cells in the worksheet. The code sample shows how to add a string 'Hello' to cell A1 and a number 123 to cell B1.

const xl = require('excel4node');
const wb = new xl.Workbook();
const ws = wb.addWorksheet('Sheet 1');
ws.cell(1, 1).string('Hello');
ws.cell(1, 2).number(123);
wb.write('ExcelFile.xlsx');

Styling Cells

This feature allows you to apply styles to cells, such as font color, size, and number formats. The code sample demonstrates how to create a style with red font color and apply it to cell A1.

const xl = require('excel4node');
const wb = new xl.Workbook();
const ws = wb.addWorksheet('Sheet 1');
const style = wb.createStyle({
  font: {
    color: '#FF0800',
    size: 12,
  },
  numberFormat: '$#,##0.00; ($#,##0.00); -',
});
ws.cell(1, 1).string('Styled Text').style(style);
wb.write('ExcelFile.xlsx');

Merging Cells

This feature allows you to merge multiple cells into one. The code sample shows how to merge cells A1 to C1 and add the text 'Merged Cells' to the merged cell.

const xl = require('excel4node');
const wb = new xl.Workbook();
const ws = wb.addWorksheet('Sheet 1');
ws.cell(1, 1, 1, 3, true).string('Merged Cells');
wb.write('ExcelFile.xlsx');

Other packages similar to excel4node

Keywords

FAQs

Package last updated on 02 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc