# JavaScript Excel workbook libraries

JavaScript Excel libraries read and write spreadsheet workbooks such as XLSX files in browsers and Node.js. Most of these libraries read the formula results stored in a workbook rather than calculating them. These libraries produce the reports, data exports, and import templates that business apps exchange as spreadsheets.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [exceljs](#exceljs) | 105.0M | 15.5K | Oct 2023 | MIT |
| [xlsx](#sheetjs-ce) | 60.5M | 36.3K | Jul 2024 | Apache-2.0 |
| [read-excel-file](#read-excel-file) | 19.6M | 331 | Nov 2026 | MIT |
| [write-excel-file](#write-excel-file) | 10.0M | 36 | Jun 2026 | MIT |
| [xlsx-js-style](#xlsx-js-style) | 4.6M | 513 | Apr 2022 | Apache-2.0 |
| [node-xlsx](#node-xlsx) | 2.0M | 3.0K | Nov 2026 | Apache-2.0 |
| [xlsx-populate](#xlsx-populate) | 1.1M | 1.0K | Mar 2020 | MIT |
| [excel4node](#excelfournode) | 536.2K | 135 | May 2023 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[exceljs](#exceljs) has the most monthly downloads in this comparison, at 105.0M.

## Capabilities

| Library | Read existing XLSX | Write XLSX |
| --- | --- | --- |
| [exceljs](#exceljs) | Yes | Yes |
| [xlsx](#sheetjs-ce) | Yes | Yes |
| [read-excel-file](#read-excel-file) | Yes | No |
| [write-excel-file](#write-excel-file) | No | Yes |
| [xlsx-js-style](#xlsx-js-style) | Yes | Yes |
| [node-xlsx](#node-xlsx) | Yes | Yes |
| [xlsx-populate](#xlsx-populate) | Yes | Yes |
| [excel4node](#excelfournode) | No | Yes |

## Libraries

### exceljs

[GitHub](https://github.com/exceljs/exceljs) · [npm](https://www.npmjs.com/package/exceljs) · [Docs](https://github.com/exceljs/exceljs#readme)

Reads, builds, and styles spreadsheet workbooks in JavaScript.

- Downloads / mo: 105.0M
- Stars: 15.5K
- Last release: 4.4.0
- License: MIT
- Capabilities: [From the exceljs docs](https://github.com/exceljs/exceljs#readme)

**Strengths**

- **Streams workbook rows.** Write rows progressively and release committed row objects.
- **Styles cells, rows, and columns.** Apply number formats and visual styles at different worksheet levels.

**Watch out for**

- **Formula results need external calculation.** Supply calculated results when writing formula cells.
- **Streaming mode excludes images.** Use document workbooks when the exported spreadsheet needs images.

```sh
npm install exceljs
```

**wonderwhy-er/DesktopCommanderMCP** (10.4K stars)

[wonderwhy-er/DesktopCommanderMCP](https://github.com/wonderwhy-er/DesktopCommanderMCP) 

```javascript
async editRange(path: string, range: string, content: any, options?: Record<string, any>): Promise<EditResult> {
        // Verify file exists and check size
        try {
            await this.checkFileSize(path);
        } catch (error) {
            if ((error as any).code === 'ENOENT' ||
                (error instanceof Error && error.message.includes('ENOENT'))) {
                throw new Error(`File not found: ${path}`);
            }
            throw error;
        }

        // Validate content
        if (!Array.isArray(content)) {
            throw new Error('Content must be a 2D array for range editing');
        }

        // Parse range: "Sheet1!A1:C10" or "Sheet1"
        const [sheetName, cellRange] = this.parseRange(range);

        const workbook = await newWorkbook();
        await workbook.xlsx.readFile(path);

        // Get or create sheet
        let worksheet = workbook.getWorksheet(sheetName);
        if (!worksheet) {
            worksheet = workbook.addWorksheet(sheetName);
        }

        if (cellRange) {
            // Write to specific range
            const { startRow, startCol, endRow, endCol } = this.parseCellRange(cellRange);

            // A FROM:TO range bounds the write: content that doesn't fit is refused
            // before any cell changes, so no cell outside the range is overwritten
            if (endRow !== undefined && endCol !== undefined) {
                const rows = content.length;
                const columns = Math.max(0, ...content.map((row: unknown) => Array.isArray(row) ? row.length : 0));
                const rangeRows = endRow - startRow + 1;
                const rangeColumns = endCol - startCol + 1;
                if (rows > rangeRows || columns > rangeColumns) {
                    throw new Error(
                        `Content has ${rows} row(s) and ${columns} column(s) but range ${cellRange} holds ` +
                        `${rangeRows} row(s) and ${rangeColumns} column(s); nothing was written`
                    );
                }
            }

            for (let r = 0; r < content.length; r++) {
                const rowData = content[r];
                if (!Array.isArray(rowData)) continue;

                for (let c = 0; c < rowData.length; c++) {
                    const cell = worksheet.getCell(startRow + r, startCol + c);
                    const value = rowData[c];

                    if (typeof value === 'string' && value.startsWith('=')) {
                        cell.value = { formula: value.substring(1) };
                    } else {
                        cell.value = value;
                    }
                }
            }
        } else {
            // Replace entire sheet content
            // Clear existing data
            worksheet.eachRow((row, rowNumber) => {
                row.eachCell((cell) => {
                    cell.value = null;
                });
            });

            // Write new data
            for (let r = 0; r < content.length; r++) {
                const rowData = content[r];
                if (!Array.isArray(rowData)) continue;

                const row = worksheet.getRow(r + 1);
                for (let c = 0; c < rowData.length; c++) {
                    const value = rowData[c];
                    if (typeof value === 'string' && value.startsWith('=')) {
                        row.getCell(c + 1).value = { formula: value.substring(1) };
                    } else {
                        row.getCell(c + 1).value = value;
                    }
                }
                row.commit();
            }
        }

        await workbook.xlsx.writeFile(path);

        return { success: true, editsApplied: 1 };
    }

```

[src/utils/files/excel.ts](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/9a101b17e44577f0baefa4c7120f087881c5cc56/src/utils/files/excel.ts#L174-L267) · [More projects using exceljs →](https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20applications%20using%20exceljs%20to%20read%2C%20build%2C%20style%20or%20export%20Excel%20workbooks&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
const ExcelJS = require('exceljs');
const workbook = new ExcelJS.Workbook();
workbook.addWorksheet('Sheet1');
await workbook.xlsx.writeFile('output.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/exceljs@4.4.0/README.md)

### xlsx

[GitHub](https://github.com/SheetJS/sheetjs) · [npm](https://www.npmjs.com/package/xlsx) · [Docs](https://sheetjs.com/)

Extracts spreadsheet data and generates new spreadsheet files.

- Downloads / mo: 60.5M
- Stars: 36.3K
- Last release: 0.20.3
- License: Apache-2.0
- Capabilities: [From the xlsx docs](https://sheetjs.com/)

**Strengths**

- **Reads varied spreadsheet formats.** Extract data from older XLS files and current XLSX workbooks.
- **Builds workbooks from row objects.** Convert JavaScript records into worksheets and export an XLSX file.

**Watch out for**

- **Npm releases trail official downloads.** Install the current release from the official download URL.
- **File decryption covers XOR only.** Use another tool for AES-encrypted XLSX files.
- **Formula results need external calculation.** Writing formulas does not calculate their results in JavaScript.

```sh
npm install https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz
```

**dbgate/dbgate** (7.4K stars)

[dbgate/dbgate](https://github.com/dbgate/dbgate) 

```javascript
_final(callback) {
    const workbook = createWorkbook(this.fileName);
    const existingLower = new Set(workbook.SheetNames.map((n) => n.toLowerCase()));
    const base = (this.sheetName || 'Sheet 1').substring(0, MAX_SHEET_NAME_LENGTH);
    let sheetName = base;
    if (existingLower.has(sheetName.toLowerCase())) {
      let counter = 1;
      do {
        const suffix = `_${counter}`;
        sheetName = base.substring(0, MAX_SHEET_NAME_LENGTH - suffix.length) + suffix;
        counter++;
      } while (existingLower.has(sheetName.toLowerCase()));
    }
    xlsx.utils.book_append_sheet(workbook, xlsx.utils.aoa_to_sheet(this.rows), sheetName);
    callback();
  }

```

[plugins/dbgate-plugin-excel/src/backend/writer.js](https://github.com/dbgate/dbgate/blob/5ff9a2876e49c8b3cd98acf5d213656fc1dfd406/plugins/dbgate-plugin-excel/src/backend/writer.js#L68-L83) · [More projects using xlsx →](https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20applications%20using%20xlsx%20to%20read%2C%20build%2C%20style%20or%20export%20Excel%20workbooks&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
const XLSX = require('xlsx');
const workbook = XLSX.utils.book_new();
const sheet = XLSX.utils.aoa_to_sheet([['Name'], ['Ada']]);
XLSX.utils.book_append_sheet(workbook, sheet, 'Sheet1');
XLSX.writeFile(workbook, 'output.xlsx');

```

From [Utilities docs](https://docs.sheetjs.com/docs/api/utilities/wb)

### read-excel-file

[GitHub](https://github.com/catamphetamine/read-excel-file) · [npm](https://www.npmjs.com/package/read-excel-file) · [Docs](https://gitlab.com/catamphetamine/read-excel-file#readme)

Reads XLSX files as rows or schema-mapped records in browsers and Node.js.

- Downloads / mo: 19.6M
- Stars: 331
- Last release: 9.3.17
- License: MIT
- Capabilities: [From the read-excel-file docs](https://gitlab.com/catamphetamine/read-excel-file#readme)

**Strengths**

- **Maps rows through schemas.** Map spreadsheet columns to named object properties and validate values.
- **Runs in browsers and Node.** Read uploaded spreadsheets or files from a Node.js application.

**Watch out for**

- **Legacy XLS files are unsupported.** Convert older workbooks to XLSX before reading them.
- **Formula values must be cached.** Formula cells without stored results are read as empty cells.

```sh
npm install read-excel-file
```

**rasonyang/ai-native-callcenter** (696 stars)

[rasonyang/ai-native-callcenter](https://github.com/rasonyang/ai-native-callcenter) 

```javascript
export async function readXlsxWorkbook(file: Blob | ArrayBuffer): Promise<XlsxSheet[]> {
  // Loaded here, not at the top of the module: the dialog is on a route the
  // SPA needs anyway, and this library is only needed once a workbook is
  // chosen. Vite puts it in a chunk of its own.
  const { default: readXlsxFile } = await import('read-excel-file/browser')
  const sheets = await readXlsxFile<NumericText>(file, {
    // The pass-through that keeps the cell's own text: the library would
    // otherwise parse the value into a Number, and `Number` then decides how
    // many digits a phone number has.
    parseNumber: (text) => ({ numericText: text }),
  })
  // A workbook with no worksheet is not one to map columns against, and the
  // caller has nothing to show for it — better refused than opened empty.
  if (sheets.length === 0) throw new Error('the workbook has no sheets')
  return sheets.map((sheet) => ({ name: sheet.sheet, table: tableOf(sheet.data as SheetRow[]) }))
}

```

[web/src/lib/xlsx.ts](https://github.com/rasonyang/ai-native-callcenter/blob/41a80d2a9c2d6064dabdcde5808d096320ec2bc6/web/src/lib/xlsx.ts#L60-L75) · [More projects using read-excel-file →](https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20applications%20using%20read-excel-file%20to%20read%2C%20build%2C%20style%20or%20export%20Excel%20workbooks&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
import { readSheet } from 'read-excel-file/node';
const rows = await readSheet('./input.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/read-excel-file@9.3.17/README.md)

### write-excel-file

[GitHub](https://github.com/catamphetamine/write-excel-file) · [npm](https://www.npmjs.com/package/write-excel-file) · [Docs](https://gitlab.com/catamphetamine/write-excel-file#readme)

Creates an XLSX file from rows of cell values in a browser or Node.js.

- Downloads / mo: 10.0M
- Stars: 36
- Last release: 4.1.1
- License: MIT
- Capabilities: [From the write-excel-file docs](https://gitlab.com/catamphetamine/write-excel-file#readme)

**Strengths**

- **Takes plain arrays of rows.** Each cell holds a string, number, boolean, date, or null.

**Watch out for**

- **Needs a recent Node.js.** The current release drops support for older Node.js versions.

```sh
npm install write-excel-file
```

**go-admin-team/go-admin-ui** (1.3K stars)

[go-admin-team/go-admin-ui](https://github.com/go-admin-team/go-admin-ui) 

```javascript
const exportExcel = async<TRow extends Record<string, unknown>>({
  header,
  fields,
  rows,
  filename,
  // Resolved per call, like the rest: this is a destructuring default, so it
  // runs when exportExcel does rather than when the module loaded.
  confirmText = i18n.global.t('composables.export.confirm')
}: ExportOptions<TRow>): Promise<boolean> => {
  if (pending) return false
  if (!rows.length) return false

  pending = true
  try {
    if (confirmText !== null) {
      try {
        await ElMessageBox.confirm(confirmText, i18n.global.t('common.notice'), {
          type: 'warning',
          confirmButtonText: i18n.global.t('common.confirm'),
          cancelButtonText: i18n.global.t('common.cancel')
        })
      } catch {
        // Dismissing the confirm is a decision, not a failure
        return false
      }
    }

    exporting.value = true
    const { data, columns } = buildSheet(header, rows.map(row => fields.map(field => row[field])))

    // The browser entry, not the package root: the root offers none, and the
    // node one reaches for fs.
    const { default: writeXlsxFile } = await import('write-excel-file/browser')
    await writeXlsxFile(data, {
      sheet: 'Sheet1',
      columns,
      dateFormat: DATE_FORMAT
    }).toFile(`${filename}.xlsx`)
    return true
  } finally {
    pending = false
    exporting.value = false
  }
}

```

[src/composables/useExport.ts](https://github.com/go-admin-team/go-admin-ui/blob/7e8d264c96d3b7b19e150e905efae4e20f416afc/src/composables/useExport.ts#L53-L96) · [More projects using write-excel-file →](https://dashboard.exa.ai/playground/search?q=write-excel-file%20GitHub%20projects)

**Quickstart**

```javascript
import writeExcelFile from 'write-excel-file/node';
const sheetData = [['Name'], ['Ada']];
await writeExcelFile(sheetData).toFile('./output.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/write-excel-file@4.1.1/README.md)

### xlsx-js-style

[GitHub](https://github.com/gitbrent/xlsx-js-style) · [npm](https://www.npmjs.com/package/xlsx-js-style) · [Docs](https://github.com/gitbrent/xlsx-js-style/)

Adds basic cell styling to SheetJS for creating Excel spreadsheets.

- Downloads / mo: 4.6M
- Stars: 513
- Last release: 1.2.0
- License: Apache-2.0
- Capabilities: [From the xlsx-js-style docs](https://github.com/gitbrent/xlsx-js-style/)

**Strengths**

- **Styles fonts, fills, and borders.** A style object on each cell sets alignment, border, fill, font, and number format.

**Watch out for**

- **Built on an older SheetJS.** The bundled SheetJS core trails the current SheetJS release.

```sh
npm install xlsx-js-style
```

**apache/zeppelin** (6.7K stars)

[apache/zeppelin](https://github.com/apache/zeppelin) 

```javascript
export const exportFile = async (tableData: TableData, type: 'csv' | 'xlsx') => {
  if (!tableData?.rows || tableData.rows.length === 0) {
    return;
  }

  const { saveAs } = await import('file-saver');

  if (type === 'xlsx') {
    const XLSX = await import('xlsx-js-style');

    const wb = XLSX.utils.book_new();
    const ws = XLSX.utils.aoa_to_sheet([tableData.columnNames, ...tableData.rows]);
    XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');

    const excelBuffer = XLSX.write(wb, {
      bookType: 'xlsx',
      type: 'array'
    });

    const blob = new Blob([excelBuffer], { type: EXCEL_TYPE });
    saveAs(blob, `export${EXCEL_EXTENSION}`);
  } else {
    const separator = ',';
    const header = tableData.columnNames.join(separator);
    const rows = tableData.rows.map(row => row.join(separator));
    const content = [header, ...rows].join('\n');

    // Excel reads a CSV without a BOM in the system code page, garbling non-ASCII data. The
    // Angular and classic exports write one for the same reason (ZEPPELIN-672).
    const BOM = '\uFEFF';
    const blob = new Blob([BOM, content], { type: 'text/plain;charset=utf-8' });
    saveAs(blob, `export.${type}`);
  }
};

```

[zeppelin-web-angular/projects/zeppelin-react/src/utils/exportFile.ts](https://github.com/apache/zeppelin/blob/3ce7b63e3593aceb21dc0aa9b1a886c553d99dbf/zeppelin-web-angular/projects/zeppelin-react/src/utils/exportFile.ts#L18-L51) · [More projects using xlsx-js-style →](https://dashboard.exa.ai/playground/search?q=xlsx-js-style%20GitHub%20projects)

**Quickstart**

```javascript
const XLSX = require('xlsx-js-style');
const workbook = XLSX.utils.book_new();
const sheet = XLSX.utils.aoa_to_sheet([[{ v: 'Name', t: 's', s: { font: { bold: true } } }]]);
XLSX.utils.book_append_sheet(workbook, sheet, 'Sheet1');
XLSX.writeFile(workbook, 'output.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/xlsx-js-style@1.2.0/README.md)

### node-xlsx

[GitHub](https://github.com/mgcrea/node-xlsx) · [npm](https://www.npmjs.com/package/node-xlsx) · [Docs](https://github.com/mgcrea/node-xlsx#readme)

Parses and builds Excel files in Node.js on top of SheetJS.

- Downloads / mo: 2.0M
- Stars: 3.0K
- Last release: 0.25.0
- License: Apache-2.0
- Capabilities: [From the node-xlsx docs](https://github.com/mgcrea/node-xlsx#readme)

**Strengths**

- **Typed API.** The package ships TypeScript types for static type checking.

```sh
npm install node-xlsx
```

**moshang-ax/lottery** (4.6K stars)

[moshang-ax/lottery](https://github.com/moshang-ax/lottery) 

```javascript
/**
 * 写入excel
 * @param {Array} data
 * @param {string} name
 */
function writeXML(data, name) {
  let buffer = xlsx.build([
    {
      name: "抽奖结果",
      data: data
    }
  ]);

  return new Promise((resolve, reject) => {
    fs.writeFile(path.join(process.cwd(), name), buffer, err => {
      if (err) {
        reject(err);
        return;
      }
      resolve();
    });
  });
}

```

[server/help.js](https://github.com/moshang-ax/lottery/blob/1590205dacb44a5a8a3a1a2c77b58e9466dc6bf1/server/help.js#L57-L79) · [More projects using node-xlsx →](https://dashboard.exa.ai/playground/search?q=node-xlsx%20GitHub%20projects)

**Quickstart**

```javascript
import xlsx from 'node-xlsx';
const sheets = xlsx.parse('./input.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/node-xlsx@0.25.0/README.md)

### xlsx-populate

[GitHub](https://github.com/dtjohnson/xlsx-populate) · [npm](https://www.npmjs.com/package/xlsx-populate) · [Docs](https://github.com/dtjohnson/xlsx-populate#readme)

Edits XLSX workbooks while preserving existing features and styles.

- Downloads / mo: 1.1M
- Stars: 1.0K
- Last release: 1.21.0
- License: MIT
- Capabilities: [From the xlsx-populate docs](https://github.com/dtjohnson/xlsx-populate#readme)

**Strengths**

- **Preserves existing workbook styles.** Edit a template while retaining its existing formatting.
- **Opens compatible encrypted XLSX files.** Supply a password for workbooks using XLSX Agile encryption.

**Watch out for**

- **Renaming sheets leaves formula references.** Formulas that point at a renamed sheet keep the old sheet name.
- **Formula results need external calculation.** Changed inputs do not recalculate formula values.

```sh
npm install xlsx-populate
```

**ananthakumaran/paisa** (3.2K stars)

[ananthakumaran/paisa](https://github.com/ananthakumaran/paisa) 

```javascript
async function parseXLSX(file: File): Promise<Result> {
  const buffer = await readFile(file);
  try {
    const sheet = XLSX.read(buffer, { type: "binary" });
    const json = XLSX.utils.sheet_to_json<string[]>(sheet.Sheets[sheet.SheetNames[0]], {
      header: 1,
      blankrows: false,
      rawNumbers: false
    });
    return { data: json };
  } catch (e) {
    if (/password-protected/.test(e.message)) {
      const password = prompt(
        "Please enter the password to open this XLSX file. Press cancel to exit."
      );
      if (password === null) {
        return { data: [], error: "Password required." };
      }

      try {
        const workbook = await XlsxPopulate.fromDataAsync(buffer, { password });
        const sheet = workbook.sheet(0);
        if (sheet) {
          let json = sheet.usedRange().value();
          json = _.map(json, (row) => {
            return _.map(row, (cell) => {
              if (cell) {
                return cell.toString();
              }
              return "";
            });
          });

          return { data: json };
        }
      } catch (e) {
        // follow through to the error below
      }

      return { data: [], error: "Unable to parse Password protected XLSX" };
    }
    throw e;
  }
}

```

[src/lib/spreadsheet.ts](https://github.com/ananthakumaran/paisa/blob/c481872120ade8f123f74a501fd6a13842495c93/src/lib/spreadsheet.ts#L84-L127) · [More projects using xlsx-populate →](https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20applications%20using%20xlsx-populate%20to%20read%2C%20build%2C%20style%20or%20export%20Excel%20workbooks&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
const XlsxPopulate = require('xlsx-populate');
const workbook = await XlsxPopulate.fromBlankAsync();
workbook.sheet(0).cell('A1').value('Hello');
await workbook.toFileAsync('./output.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/xlsx-populate@1.21.0/README.md)

### excel4node

[GitHub](https://github.com/advisr-io/excel4node) · [npm](https://www.npmjs.com/package/excel4node) · [Docs](https://github.com/advisr-io/excel4node#readme)

Generates XLSX files with styles, formulas, and multiple worksheets.

- Downloads / mo: 536.2K
- Stars: 135
- Last release: 1.8.2
- License: MIT
- Capabilities: [From the excel4node docs](https://github.com/advisr-io/excel4node#readme)

**Strengths**

- **Reusable cell styles.** createStyle defines a style that many cells can share.

```sh
npm install excel4node
```

**sysgears/apollo-universal-starter-kit** (1.7K stars)

[sysgears/apollo-universal-starter-kit](https://github.com/sysgears/apollo-universal-starter-kit) 

```javascript
export default function generateBufferExcel(contacts: UserContact[]) {
  const ws = wb.addWorksheet('Report', options);
  const titles = Object.keys(contacts[0]);

  titles.forEach((title, i) => {
    const capitalized = title[0].toUpperCase() + title.slice(1);
    ws.cell(1, i + 1)
      .string(capitalized)
      .style(style);
  });

  contacts.forEach((item, i) => {
    const values = Object.values(item);
    values.forEach((value, j) => {
      ws.cell(i + 2, j + 1)
        .string(String(value))
        .style(style);
    });
  });

  return wb.writeToBuffer();
}

```

[modules/reports/server-ts/excel/helpers/generateExcel.ts](https://github.com/sysgears/apollo-universal-starter-kit/blob/ec9d80d3a8444a40ae9076d175111e5b8130fa12/modules/reports/server-ts/excel/helpers/generateExcel.ts#L17-L38) · [More projects using excel4node →](https://dashboard.exa.ai/playground/search?q=excel4node%20GitHub%20projects)

**Quickstart**

```javascript
const xl = require('excel4node');
const workbook = new xl.Workbook();
const sheet = workbook.addWorksheet('Sheet1');
sheet.cell(1, 1).string('Hello');
workbook.write('output.xlsx');

```

From [README.md](https://cdn.jsdelivr.net/npm/excel4node@1.8.2/README.md)

## FAQ

### What is ExcelJS?

[ExcelJS](#exceljs) reads, builds, and styles Excel workbooks in JavaScript. Its streaming writer adds rows progressively and releases committed row objects.

### What is SheetJS?

[SheetJS CE](#sheetjs-ce) is the community edition of the SheetJS spreadsheet parser and writer. It extracts data from older XLS files and current XLSX workbooks and exports new workbooks.

### ExcelJS vs SheetJS: which should I use?

[ExcelJS](#exceljs) builds and styles XLSX workbooks, with a streaming writer for large reports. [SheetJS CE](#sheetjs-ce) reads many spreadsheet formats and converts between them.

### Does npm install xlsx get the current SheetJS release?

The official installation page says the npm registry is out of date. The official download URL supplies version 0.20.3.

### What is xlsx-js-style?

[xlsx-js-style](#xlsx-js-style) adds basic cell styles to SheetJS, such as fonts, fills, borders, alignment, and number formats.

### Can these libraries calculate Excel formulas?

ExcelJS requires the formula result to be supplied. SheetJS CE does not automatically calculate formula results. xlsx-populate does not recalculate values after workbook changes.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best JavaScript Excel libraries ExcelJS SheetJS xlsx-populate read-excel-file code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
