Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Office File PreviewNew to Visual Studio Code? Get it now.
Office File Preview

Office File Preview

takashi-uchida

|
529 installs
| (0) | Free
Read-only preview for .docx, .xlsx, .csv, .pdf and .pptx files inside VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Office File Preview

Read-only preview for office documents, PDFs, diagrams, and markup files directly inside VS Code.

Supported Formats

Format Extensions Renderer
Word .docx docx-preview — text, headings, tables, lists, styles
Excel .xlsx, .xlsm SheetJS — all sheets with tab switcher
CSV .csv Lightweight table preview with UTF-8 and Shift_JIS decoding
PDF .pdf pdf.js — all pages, high-resolution canvas
PowerPoint .pptx pptx-preview — slides in list view
Mermaid .mmd, .mermaid Mermaid — flowcharts, sequence diagrams, Gantt, etc.
HTML .html, .htm Sandboxed iframe preview
Markdown .md, .markdown Rendered markdown with embedded Mermaid diagrams

All previews are read-only. Files are never modified.

Usage

Opening a .docx, .xlsx, .pdf, .pptx, .mmd, or .mermaid file automatically shows the preview.

For .csv, .html, .htm, .md, and .markdown files (which have built-in VS Code editors), right-click the file → Reopen Editor With… → Office File Preview (...) to switch to the preview.

Mermaid in Markdown

Mermaid code blocks inside .md files are automatically rendered as diagrams. The theme follows VS Code's dark/light mode.

```mermaid
graph TD
  A[Start] --> B{Decision}
  B -->|Yes| C[Do it]
  B -->|No| D[Skip]
```

Known Limitations

  • pptx rendering faithfulness depends on slide complexity (animations and SmartArt may not render correctly)
  • Large PDFs (200+ pages) render all pages at once; initial load may take a moment
  • HTML preview uses a sandboxed iframe; resources with absolute external URLs may not load
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft