-
Notifications
You must be signed in to change notification settings - Fork 530
command create
zmworm edited this page May 24, 2026
·
54 revisions
Create a blank Office document.
officecli create <file> [--type <type>]
Creates a new blank Office document at the specified path. The document type is inferred from the file extension, or can be explicitly specified with --type. If the file has no extension but --type is provided, the appropriate extension is appended automatically.
The created document contains the minimal required structure:
- DOCX: Document with an empty body
- XLSX: Workbook with one sheet ("Sheet1") containing empty sheet data
- PPTX: Presentation with a slide master, theme, and 4 slide layouts
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
file |
string | Yes | - | Output file path (.docx, .xlsx, or .pptx) |
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
--type |
string | No | inferred from extension | Document type: docx, xlsx, or pptx
|
--minimal |
bool | No | false |
Emit raw OOXML scaffolding only — no theme, no default style table, no layouts. Useful when about to replay a full dump over the result. (docx) |
--json |
bool | No | false |
Output result as JSON envelope |
# Create a blank Word document officecli create report.docx # Create a blank Excel spreadsheet officecli create data.xlsx # Create a blank PowerPoint presentation officecli create slides.pptx # Create with explicit type (extension appended automatically) officecli create report --type docx
- If the file is currently held by a resident process (via
open), the command will fail. You mustclosethe file first. - The file will be overwritten if it already exists.
- Creating a
.pptxoutputsslideWidthandslideHeightin the console.
Based on OfficeCLI v1.0.97