docx-official

Solid

Generating Word documents programmatically with docx library in Node.js. Use when generating .docx reports, contracts, invoices, or any structured Word document from data.

Data & Documents 30 stars 9 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
50
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Generating Word Documents with docx ## Installation ```bash npm install docx # or pnpm add docx ``` ## Basic Document ```typescript import { Document, Packer, Paragraph, TextRun, HeadingLevel, AlignmentType, BorderStyle, } from 'docx' async function generateReport(data: ReportData): Promise<Buffer> { const doc = new Document({ creator: 'Full Stack HQ', title: data.title, description: data.description, styles: { default: { document: { run: { font: 'Calibri', size: 24, // half-points (24 = 12pt) color: '333333', }, }, }, }, sections: [ { properties: {}, children: [ new Paragraph({ text: data.title, heading: HeadingLevel.HEADING_1, spacing: { after: 200 }, }), new Paragraph({ children: [ new TextRun({ text: 'Generated: ', bold: true }), new TextRun({ text: new Date().toLocaleDateString() }), ], spacing: { after: 400 }, }), ...data.paragraphs.map(text => new Paragraph({ text, spacing: { after: 160 }, alignment: AlignmentType.JUSTIFIED, }) ), ], }, ], }) return Packer.toBuffer(doc) } ``` ## Tables ```typescript import { Table, TableRow, TableCell, WidthType, ShadingType...

Details

Author
sabahattink
Repository
sabahattink/antigravity-fullstack-hq
Created
8 months ago
Last Updated
5 days ago
Language
PowerShell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category