exceljs
Generate and parse Excel spreadsheets with ExcelJS — create workbooks with multiple sheets, styled cells, formulas, charts, images, and conditional formatting. Use when tasks involve exporting application data to .xlsx, building financial reports, parsing uploaded spreadsheets, or creating data import/export pipelines.
Best use case
exceljs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate and parse Excel spreadsheets with ExcelJS — create workbooks with multiple sheets, styled cells, formulas, charts, images, and conditional formatting. Use when tasks involve exporting application data to .xlsx, building financial reports, parsing uploaded spreadsheets, or creating data import/export pipelines.
Teams using exceljs should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/exceljs/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How exceljs Compares
| Feature / Agent | exceljs | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate and parse Excel spreadsheets with ExcelJS — create workbooks with multiple sheets, styled cells, formulas, charts, images, and conditional formatting. Use when tasks involve exporting application data to .xlsx, building financial reports, parsing uploaded spreadsheets, or creating data import/export pipelines.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ExcelJS
Read and write Excel files in Node.js. Full support for styles, formulas, images, and streaming.
## Setup
```bash
# Install ExcelJS for spreadsheet generation and parsing.
npm install exceljs
```
## Creating a Workbook
```typescript
// src/excel/create.ts — Create an Excel workbook with a styled header row and data.
import ExcelJS from "exceljs";
const workbook = new ExcelJS.Workbook();
workbook.creator = "Report System";
workbook.created = new Date();
const sheet = workbook.addWorksheet("Sales Data", {
properties: { tabColor: { argb: "FF3498DB" } },
});
// Define columns
sheet.columns = [
{ header: "Product", key: "product", width: 25 },
{ header: "Revenue", key: "revenue", width: 15 },
{ header: "Units Sold", key: "units", width: 12 },
{ header: "Growth", key: "growth", width: 12 },
];
// Style header row
sheet.getRow(1).font = { bold: true, color: { argb: "FFFFFFFF" } };
sheet.getRow(1).fill = {
type: "pattern",
pattern: "solid",
fgColor: { argb: "FF3498DB" },
};
// Add data
const data = [
{ product: "Widget Pro", revenue: 45000, units: 1200, growth: 0.12 },
{ product: "Gadget Plus", revenue: 32000, units: 800, growth: 0.08 },
{ product: "Tool Basic", revenue: 18000, units: 2400, growth: -0.03 },
];
data.forEach((row) => sheet.addRow(row));
// Format numbers
sheet.getColumn("revenue").numFmt = "$#,##0";
sheet.getColumn("growth").numFmt = "0.0%";
await workbook.xlsx.writeFile("sales-report.xlsx");
```
## Formulas
```typescript
// src/excel/formulas.ts — Add formulas for totals, averages, and derived values.
import ExcelJS from "exceljs";
const workbook = new ExcelJS.Workbook();
const sheet = workbook.addWorksheet("Financials");
sheet.columns = [
{ header: "Item", key: "item", width: 20 },
{ header: "Q1", key: "q1", width: 12 },
{ header: "Q2", key: "q2", width: 12 },
{ header: "Total", key: "total", width: 12 },
];
sheet.addRow({ item: "Revenue", q1: 100000, q2: 120000 });
sheet.addRow({ item: "Expenses", q1: 80000, q2: 85000 });
sheet.addRow({ item: "Profit" });
// Formula references
sheet.getCell("D2").value = { formula: "B2+C2" } as any;
sheet.getCell("D3").value = { formula: "B3+C3" } as any;
sheet.getCell("B4").value = { formula: "B2-B3" } as any;
sheet.getCell("C4").value = { formula: "C2-C3" } as any;
sheet.getCell("D4").value = { formula: "D2-D3" } as any;
await workbook.xlsx.writeFile("financials.xlsx");
```
## Conditional Formatting
```typescript
// src/excel/conditional.ts — Highlight cells based on value thresholds.
import ExcelJS from "exceljs";
const workbook = new ExcelJS.Workbook();
const sheet = workbook.addWorksheet("KPIs");
sheet.columns = [
{ header: "Metric", key: "metric", width: 20 },
{ header: "Value", key: "value", width: 15 },
];
sheet.addRows([
{ metric: "Uptime", value: 99.9 },
{ metric: "Error Rate", value: 2.3 },
{ metric: "Response Time (ms)", value: 450 },
]);
// Green for values above target, red for below
sheet.addConditionalFormatting({
ref: "B2:B4",
rules: [
{
type: "cellIs",
operator: "greaterThan",
formulae: [95],
style: { fill: { type: "pattern", pattern: "solid", bgColor: { argb: "FF27AE60" } } },
priority: 1,
},
],
});
await workbook.xlsx.writeFile("kpis.xlsx");
```
## Reading Excel Files
```typescript
// src/excel/read.ts — Parse an uploaded Excel file and extract data as objects.
import ExcelJS from "exceljs";
export async function parseExcel(filePath: string) {
const workbook = new ExcelJS.Workbook();
await workbook.xlsx.readFile(filePath);
const sheet = workbook.getWorksheet(1)!;
const headers: string[] = [];
const rows: Record<string, any>[] = [];
sheet.eachRow((row, rowNumber) => {
if (rowNumber === 1) {
row.eachCell((cell) => headers.push(String(cell.value)));
} else {
const obj: Record<string, any> = {};
row.eachCell((cell, colNumber) => {
obj[headers[colNumber - 1]] = cell.value;
});
rows.push(obj);
}
});
return rows;
}
```
## Streaming Large Files
```typescript
// src/excel/stream.ts — Write large datasets without holding everything in memory.
// Uses ExcelJS streaming writer for millions of rows.
import ExcelJS from "exceljs";
import fs from "fs";
export async function streamLargeExport(data: AsyncIterable<any[]>, outputPath: string) {
const workbook = new ExcelJS.stream.xlsx.WorkbookWriter({
stream: fs.createWriteStream(outputPath),
useStyles: true,
});
const sheet = workbook.addWorksheet("Data");
sheet.columns = [
{ header: "ID", key: "id", width: 10 },
{ header: "Name", key: "name", width: 30 },
{ header: "Value", key: "value", width: 15 },
];
for await (const batch of data) {
for (const row of batch) {
sheet.addRow(row).commit();
}
}
sheet.commit();
await workbook.commit();
}
```Related Skills
zustand
You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.
zoho
Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.
zod
You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.
zipkin
Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.
zig
Expert guidance for Zig, the systems programming language focused on performance, safety, and readability. Helps developers write high-performance code with compile-time evaluation, seamless C interop, no hidden control flow, and no garbage collector. Zig is used for game engines, operating systems, networking, and as a C/C++ replacement.
zed
Expert guidance for Zed, the high-performance code editor built in Rust with native collaboration, AI integration, and GPU-accelerated rendering. Helps developers configure Zed, create custom extensions, set up collaborative editing sessions, and integrate AI assistants for productive coding.
zeabur
Expert guidance for Zeabur, the cloud deployment platform that auto-detects frameworks, builds and deploys applications with zero configuration, and provides managed services like databases and message queues. Helps developers deploy full-stack applications with automatic scaling and one-click marketplace services.
zapier
Automate workflows between apps with Zapier. Use when a user asks to connect apps without code, automate repetitive tasks, sync data between services, or build no-code integrations between SaaS tools.
zabbix
Configure Zabbix for enterprise infrastructure monitoring with templates, triggers, discovery rules, and dashboards. Use when a user needs to set up Zabbix server, configure host monitoring, create custom templates, define trigger expressions, or automate host discovery and registration.
yup
Validate data with Yup schemas. Use when adding form validation, defining API request schemas, validating configuration, or building type-safe validation pipelines in JavaScript/TypeScript.
yt-dlp
Download video and audio from YouTube and other platforms with yt-dlp. Use when a user asks to download YouTube videos, extract audio from videos, download playlists, get subtitles, download specific formats or qualities, batch download, archive channels, extract metadata, embed thumbnails, download from social media platforms (Twitter, Instagram, TikTok), or build media ingestion pipelines. Covers format selection, audio extraction, playlists, subtitles, metadata, and automation.
youtube-transcription
Transcribe YouTube videos to text using OpenAI Whisper and yt-dlp. Use when the user wants to get a transcript from a YouTube video, generate subtitles, convert video speech to text, create SRT/VTT captions, or extract spoken content from YouTube URLs.