Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Office Viewer EnhancedNew to Visual Studio Code? Get it now.
Office Viewer Enhanced

Office Viewer Enhanced

rjwang

|
436 installs
| (1) | Free
Preview Word, Excel, PDF, Markdown, and more in VS Code and Kiro. Export self-contained HTML with embedded images and render Mermaid v11 diagrams.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Office Viewer Enhanced

Preview Word, Excel, PDF, Markdown, and more directly in VS Code and Kiro. Export self-contained HTML with embedded images, and render modern Mermaid diagrams with Mermaid v11 support.

Office Viewer (Fork)

Forked from cweijan/vscode-office, maintained by RJ.Wang.

This extension is a maintained fork of the original project, with improvements focused on usability, portability, offline support, and package size.

What's improved in this fork

  • Self-contained HTML export
    • Local images are automatically converted to Base64 and embedded into exported HTML files
    • Share a single .html file without broken local image references
  • Smaller package size
    • Removed the bundled Icon Theme and Java Decompiler to keep the extension focused on document viewing
    • Reduced package size by about 4.4 MB
  • Modern Mermaid support
    • Upgraded Mermaid from v8.8.0 to v11.14.0
    • Newer Mermaid syntax renders correctly
    • Mermaid is loaded locally instead of from a CDN for better offline support
    • Replaced the deprecated markdown-it-mermaid dependency with a lightweight built-in integration
  • Cleaner rendering
    • Markdown preview now fills the available editor width instead of wrapping too early
    • Mermaid diagrams and document content are left-aligned instead of centered
    • Removed dead code and fixed typos across the codebase

Introduction

English | 简体中文

This extension supports previewing the following file types in VS Code:

  • Excel: .xls, .xlsx, .csv
  • Word: .docx
  • SVG: .svg
  • PDF: .pdf
  • Fonts: .ttf, .otf, .woff, .woff2
  • Markdown: .md
  • HTTP requests: .http
  • Windows Registry files: .reg
  • Archive files: .zip, .jar, .vsix, .rar

Markdown

This extension replaces the default Markdown editor with Vditor. Please note that Vditor is no longer actively maintained.

If you want to use the original VS Code editor, add the following to your settings.json:

{
    "workbench.editorAssociations": {
        "*.md": "default",
        "*.markdown": "default"
    }
}

Right-click in the editor to export Markdown to PDF, DOCX, or HTML. PDF export requires Chromium, which can be configured via vscode-office.chromiumPath.

When exporting to HTML, local images are automatically embedded as Base64, so the exported file is fully self-contained and can be shared directly without losing any images.

Markdown Editor Screenshot

Keyboard shortcuts are based on Vditor shortcuts, with additional commands:

  • Move list up: Ctrl+Alt+I / ⌘ ^ I
  • Move list down: Ctrl+Alt+J / ⌘ ^ J
  • Edit in VS Code: Ctrl+Alt+E / ⌘ ^ E

Tips:

  • Resize the editor with Ctrl/Cmd + mouse scroll
  • Open hyperlinks with Ctrl/Meta + click or double-click

HTML

The HTML editor supports live preview. Press Ctrl+Shift+V to open the live view.

Acknowledgements

This project would not exist without the work of the following authors:

  • cweijan — Author of the original vscode-office extension, which this fork is based on. Also maintains a customized Vditor build tailored for the extension.
  • Vanessa219 (Liyuan Li) — Author of Vditor, the browser-based Markdown WYSIWYG editor at the heart of this extension's Markdown editing experience. Developed under the B3log open-source community, licensed under MIT.

Credits

  • PDF rendering: mozilla/pdf.js/
  • DOCX rendering: VolodymyrBaydalka/docxjs
  • XLSX rendering:
    • SheetJS/sheetjs: XLSX parsing
    • myliang/x-spreadsheet: XLSX rendering
  • HTTP: Rest Client
  • Markdown: Vanessa219/vditor
  • Mermaid diagrams: mermaid-js/mermaid
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft