1---2name: document-creator3description: Use when creating, editing, and generating Office documents programmatically4 — Word, PowerPoint, Excel, and PDF. One interface for all document formats with5 shared methodology.6domain: content7author: oyi778license: Apache-2.09subdomain: content-creation10tags:11- documents12- office13- docx14- pptx15- xlsx16- pdf17- automation18- reports19version: 2.0.020category: content21metadata:22 source: https://skillmd.com/skills/oyi77/document-creator23---2425262728# Document Creator2930Generate professional Office documents programmatically across all major formats. Each format has dedicated reference files with library-specific code, but the workflow is shared:3132## Overview3334| Format | Library (Python) | Library (Node.js) | Reference |35|--------|-----------------|-------------------|-----------|36| **Word** (.docx) | python-docx | docx | [reference/format/docx.md](./reference/format/docx.md) |37| **PowerPoint** (.pptx) | python-pptx | pptxgenjs | [reference/format/pptx.md](./reference/format/pptx.md) |38| **Excel** (.xlsx) | openpyxl / xlsxwriter | exceljs / xlsx | [reference/format/xlsx.md](./reference/format/xlsx.md) |39| **PDF** (.pdf) | fpdf2 / reportlab | pdfkit / jspdf | [reference/format/pdf.md](./reference/format/pdf.md) |4041## Workflow42431. **Define structure** — Plan document sections, sheets, slides, or pages442. **Choose format** — Select the right format for the audience (Word for contracts, PPTX for presentations, XLSX for data, PDF for distribution)453. **Load data** — From JSON, CSV, database, or API464. **Generate** — Use the format-specific reference for exact API calls475. **Validate** — Check output opens cleanly in the target application486. **Deliver** — Save or stream to client4950## When to Use5152| Need | Format |53|------|--------|54| Contracts, proposals, reports | **Word** (.docx) |55| Meeting decks, pitches | **PowerPoint** (.pptx) |56| Financial models, data tables | **Excel** (.xlsx) |57| Distribution, printing, archiving | **PDF** |58| Bulk personalized documents | **Word** + mail merge |59| Charts with live data | **Excel** or **PowerPoint** |60| Invoice generation | **PDF** or **Word** |61626364## Anti-Rationalization Table6566| Excuse | Reality | Rule |67|--------|---------|------|68| "I'll just use one library for everything" | Each format has different semantics — one library can't do it all | Use the right library per format (python-docx, python-pptx, openpyxl, fpdf2) |69| "Manual document creation is fine" | Manual creation doesn't scale and introduces errors | Programmatic generation ensures consistency and version control |70| "PDF generation is too complex" | fpdf2 and reportlab handle complex layouts well | Invest in learning the library; it pays off on every document |717273| Need | Format |74|------|--------|75| Contracts, proposals, reports | **Word** (.docx) |76| Meeting decks, pitches | **PowerPoint** (.pptx) |77| Financial models, data tables | **Excel** (.xlsx) |78| Distribution, printing, archiving | **PDF** |79| Bulk personalized documents | **Word** + mail merge |80| Charts with live data | **Excel** or **PowerPoint** |81| Invoice generation | **PDF** or **Word** |8283## Provider Reference8485Load format-specific reference files for exact API usage, code examples, and troubleshooting.86## Process87881. **Define structure** — Plan document sections, sheets, slides, or pages892. **Choose format** — Select the right format for the audience (Word for contracts, PPTX for presentations, XLSX for data, PDF for distribution)903. **Load data** — From JSON, CSV, database, or API914. **Generate** — Use the format-specific reference for exact API calls925. **Validate** — Check output opens cleanly in the target application936. **Deliver** — Save or stream to client9495## Verification Checklist9697- [ ] Output opens correctly in target application (Word, PowerPoint, Excel, PDF viewer)98- [ ] All data populated correctly without truncation99- [ ] Formatting matches specifications (fonts, colors, layout)100- [ ] File size is reasonable for distribution101- [ ] Cross-platform compatibility verified