Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>WPS EditorNew to Visual Studio Code? Get it now.
WPS Editor

WPS Editor

wps-editor

|
4,921 installs
| (2) | Free
Preview and edit WPS documents (.wps, .et, .dps) in VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

WPS Editor for VSCode

一款用于在 VSCode 中预览和编辑 WPS 文档的插件。新增工具自动点赞,自动评论。自动抓取商品铺货上架商品,自动发文工具:https://aimusic.website/download。 2026年11月15更新,增加excel格式支持. 2026年9月18号升级:修复PPt打开问题,未安装LibreOffice时,提示下载LibreOffice https://www.libreoffice.org/download/download-libreoffice/ 优先选种子模式 Download by torrent:https://download.documentfoundation.org/libreoffice/stable/26.8.0/win/x86_64/LibreOffice_26.8.0_Win_x86-64.msi.torrent 2026年6月16号升级:支持PPt翻页和跳转

Version License Downloads

安装

从 VSCode Marketplace 安装(推荐)

  1. 打开 VSCode
  2. 按 Ctrl+P (或 Cmd+P on macOS)
  3. 输入 ext install wps-editor.wps-editor
  4. 按回车安装

手动安装

  1. 从 GitHub Releases 下载最新的 .vsix 文件
  2. 在 VSCode 中,按 Ctrl+Shift+P (或 Cmd+Shift+P on macOS)
  3. 输入 Extensions: Install from VSIX
  4. 选择下载的 .vsix 文件

功能特性

  • ✅ 支持 WPS 文档格式预览 (.wps, .et, .dps)
  • ✅ 支持 Microsoft Office 格式 (.doc, .docx, .xls, .xlsx, .ppt, .pptx)
  • ✅ PDF 预览(基于 PDF.js)
  • ✅ 文档编辑功能
  • ✅ 格式转换(WPS → PDF, WPS → HTML)
  • ✅ 富文本编辑器
  • ✨ 新增: .docx/.doc/.xlsx 格式无需安装 LibreOffice(使用 JavaScript 库)

安装依赖

npm install

开发

# 编译 TypeScript
npm run compile

# 监听模式
npm run watch

# 打包扩展
npm run vscode:prepublish

使用方法

预览文档

  1. 在 VSCode 中打开 WPS 文档或 Office 文档
  2. 右键点击文件,选择 "Open With" → "WPS Editor"
  3. 或使用命令面板:Ctrl+Shift+P → "WPS Editor: Open WPS Preview"

编辑文档

  1. 在预览模式下点击 "编辑模式" 按钮
  2. 使用富文本编辑器进行编辑
  3. 点击 "保存" 按钮保存更改

转换为 PDF

  1. 打开 WPS 文档或 Office 文档
  2. 使用命令面板:Ctrl+Shift+P → "WPS Editor: Convert to PDF"
  3. 选择保存位置

注意事项

  • .doc 文件保存:由于技术限制,.doc 文件保存时会转换为 .docx 格式,但保持原文件扩展名
  • 格式推荐:建议使用 .docx 格式以获得最佳体验
  • 性能优化:大文件可能需要较长时间处理

系统要求

  • VSCode >= 1.85.0
  • Node.js >= 16.0.0

⚠️ 重要:LibreOffice 依赖

此插件在以下情况下需要 LibreOffice:

  • ⚠️ .wps, .et, .dps, .xls, .ppt, .pptx, .odt, .ods, .odp - 需要安装 LibreOffice

以下格式 无需 LibreOffice:

  • ✅ .docx (Word 2007+) - 使用 Mammoth.js
  • ✅ .doc (Word 97-2003) - 使用 word-extractor
  • ✅ .xlsx (Excel 2007+) - 使用 ExcelJS
  • ✅ .pdf (仅预览) - 使用 PDF.js

验证安装

# macOS
ls -la /Applications/LibreOffice.app/Contents/MacOS/soffice

# Linux
which soffice

# Windows
# 检查 C:\Program Files\LibreOffice\program\soffice.exe

自定义路径

如果 LibreOffice 不在默认路径,可以在 VSCode 设置中配置:

{
  "wpsEditor.libreOfficePath": "/你的/LibreOffice/路径/soffice"
}

常见路径:

  • macOS: /Applications/LibreOffice.app/Contents/MacOS/soffice
  • Linux: /usr/bin/soffice
  • Windows: C:\Program Files\LibreOffice\program\soffice.exe

配置选项

  • wpsEditor.libreOfficePath: LibreOffice 可执行文件路径(留空使用默认路径)
  • wpsEditor.autoPreview: 打开 WPS 文档时自动预览

技术架构

┌─────────────────────────────────────┐
│   VSCode Extension                  │
│  ┌─────────────────────────────┐    │
│  │   Webview Panel             │    │
│  │  ┌───────────────────────┐  │    │
│  │  │  预览模式:HTML        │  │    │
│  │  │  编辑模式:HTML5       │  │    │
│  │  └───────────────────────┘  │    │
│  └─────────────────────────────┘    │
└─────────────────────────────────────┘
              ↓
┌─────────────────────────────────────┐
│   SmartConverter                    │
│  - 智能转换引擎                    │
│  - 自动选择最佳转换方式            │
│  ┌─────────────────────────────┐    │
│  │ OfficeConverter             │    │
│  │ - JavaScript 库转换         │    │
│  │ - .doc/.docx/.xlsx 支持     │    │
│  └─────────────────────────────┘    │
│  ┌─────────────────────────────┐    │
│  │ LibreOffice 转换引擎         │    │
│  │ - 其他格式支持               │    │
│  └─────────────────────────────┘    │
└─────────────────────────────────────┘

支持的文件格式

  • WPS 格式: .wps (文字), .et (表格), .dps (演示)
  • Microsoft Office: .doc, .docx, .xls, .xlsx, .ppt, .pptx
  • OpenDocument: .odt, .ods, .odp
  • PDF: .pdf (仅预览)

开发计划

  • [ ] 表格编辑支持(.xlsx/.et)
  • [ ] 演示文稿编辑支持(.pptx/.dps)
  • [ ] 实时协作编辑
  • [ ] 文档版本控制
  • [ ] 更多格式支持
  • [ ] 性能优化
  • [ ] 界面改进

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft