Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

command create

zmworm edited this page May 24, 2026 · 54 revisions

create

Create a blank Office document.

Synopsis

officecli create <file> [--type <type>]

Description

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

Arguments

Name Type Required Default Description
file string Yes - Output file path (.docx, .xlsx, or .pptx)

Options

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

Examples

# 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

Notes

  • If the file is currently held by a resident process (via open), the command will fail. You must close the file first.
  • The file will be overwritten if it already exists.
  • Creating a .pptx outputs slideWidth and slideHeight in the console.

See Also


Based on OfficeCLI v1.0.97

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /