This extension lets you preview and edit common office and design files directly in VS Code.
- Excel:
.xls,.xlsx,.xlsm,.csv,.ods - Word:
.docx,.dotx - PowerPoint:
.pptx,.pptm - PDF & eBook:
.pdf,.epub - HEIC/TIFF:
.heic,.heif,.tiff - Design:
.psd,.xmind,.icns,.svg - Font:
.ttf,.otf,.woff,.woff2 - Markdown:
.md,.markdown - HTML:
.html,.htm - HTTP request:
.http,.rest - Java:
.class(decompiler) - Compressed files:
.zip,.jar,.vsix,.rar,.7z,.tar,.tar.gz,.tgz,.apk
Office Viewer includes a full Git History workspace for exploring repositories without leaving VS Code. Open it from the Source Control view, the editor title bar, the editor context menu, or the file explorer context menu.
This extension replaces the default Markdown editor with a WYSIWYG editor.
To use the built-in VS Code Markdown editor instead, add this 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; set the browser path with vscode-office.chromiumPath.
Shortcuts: Based on shortcut.md, plus:
- New line:
Ctrl+Enter/⌘ Enter - Edit hyperlink:
Alt+Enter/^ Enter - Set CodeMirror language:
Alt+Enter/^ Enter - Edit in VS Code:
Ctrl Alt E/⌘ ^ E - Paste as plain text:
Ctrl+Shift+V/⌘ ⇧ V
- HTML: live preview while editing; press
Ctrl+Shift+Vto open the live view - YAML: document outline and anchor navigation (Go to Definition for alias references)
- Icon theme: includes a subset of Material Icon Theme icons, plus Office Material Icon Theme and One Dark Modern color themes
- Excel: preview and save
.xlsx,.xls,.xlsm,.csv, and.odsfiles (saving.xlsxmay lose formatting;.csvdoes not support GBK-encoded Chinese) - HTTP: send requests from
.httpand.restfiles (integrated from REST Client with fixes for local request issues); pressCtrl+Enter/⌘ Enterto send - Java: decompile and view
.classfiles
Database Client for Visual Studio Code, supporting the management of MySQL/MariaDB, PostgreSQL, SQLite, Redis, and ElasticSearch, and works as an SSH client to boost your productivity! Get it now.
git clone https://github.com/cweijan/vscode-office.git
cd vscode-office
npm installDesktop extension (full feature set):
npm run devPress F5 in VS Code, or choose Extension from Run and Debug.
Web extension (Markdown, HTML, YAML in the browser):
npm run dev:webChoose Extension (Web) from Run and Debug.
npm run build # production build
npm run package # create .vsixOffice Viewer collects anonymous usage data to understand which preview features are used, so we can improve the extension. Data is sent to Azure Application Insights via the official @vscode/extension-telemetry module.
| Event | When | Properties |
|---|---|---|
view.open |
A custom preview/editor is opened | viewType (e.g. excel, markdown, pdf), fileType (extension only, e.g. xlsx, md) |
We do not collect file paths, file names, URLs, repository names, request contents, or other personally identifiable information.
Telemetry is sent only when both of the following allow it:
- VS Code global telemetry is enabled (
telemetry.telemetryLevelis notoff, ortelemetry.enableTelemetryistrueon older versions). - Extension telemetry is enabled: set
vscode-office.enableTelemetrytofalsein Settings.
You can also disable all VS Code telemetry in Settings → Application → Telemetry.
If you build and publish this extension yourself, see docs/telemetry.md for Azure Application Insights setup and sample queries.
- PDF rendering: mozilla/pdf.js
- DOCX rendering: VolodymyrBaydalka/docxjs
- PPTX rendering: pptxviewjs
- XLSX rendering:
- SheetJS/sheetjs: XLSX parsing
- myliang/x-spreadsheet: XLSX rendering
- EPUB: futurepress/epub.js
- PSD: ag-psd
- XMind: mind-elixir, @mind-elixir/import-xmind
- HEIC conversion: heic2any
- Java decompiler: JetBrains/java-decompiler
- HTTP: REST Client
- Markdown: Vanessa219/vditor
- Material Icon theme: PKief/vscode-material-icon-theme


