Melody-max114/dsh-excel-panel

Plugin插件 Native原生 ⭐ 3 MIT Docs & Writing文档与写作UI & Themes界面与主题

DSH 右侧栏 Excel 编辑插件:支持 xlsx 预览/编辑、公式实时计算、合并单元格、格式设置并保存回原文件。

Project Overview项目介绍

dsh-excel-panel is a native right-sidebar plugin built exclusively for DSH Web, and it integrates with dsh-better-sidebar to enable in-chat editing of .xlsx files. It does not require users to leave the DSH chat interface to open, edit, style, and save Excel spreadsheets, with full support for common operations like formula calculation and worksheet management. There are three official installation methods: the recommended method is installing via npm with the DSH CLI, while users can also install it from a local directory or a downloaded zip release from GitHub.

This plugin is designed for users who work with table data within the DSH chat workflow, eliminating the need to switch to a separate desktop Excel app for common quick edits. After installation, you just need to restart DSH Web, then open any .xlsx file directly from the right sidebar. You can click a cell to select it, double-click to edit its content, enter formulas in the full dedicated formula bar, adjust styles for multiple cells at once, and save all changes back to the original file with one click.

This plugin is released under the open-source MIT license, which allows free use, modification, and distribution without any restriction. It includes a full formatting toolbar that supports custom font colors, background colors, undo and redo, inserting and deleting rows and columns, and adjusting row height and column width via drag and drop. When saving edits, it rebuilds the entire xlsx file to avoid common style corruption, so multiple saves will not cause any unexpected style loss, and it currently only supports the native DSH Web platform.

dsh-excel-panel 是专为 DSH Web 开发的原生右侧栏插件,依赖 dsh-better-sidebar 运行,允许用户无需离开聊天界面就能直接预览、编辑并保存 .xlsx 表格文件。它支持单元格编辑、样式调整、公式计算、工作表管理等常用 Excel 操作,编辑完成后可一键将修改写回原文件。用户可以通过 npm 安装、本地文件依赖添加、GitHub Releases 下载 zip 包安装这三种方式部署该插件。

该插件适合需要在 DSH 聊天工作流中处理表格数据的用户,不需要额外打开本地 Excel 软件就能完成全部修改操作。日常使用时,重启 DSH Web 后即可在右侧栏打开任意 .xlsx 文件,单击选中单元格、双击编辑内容,也可在公式栏输入计算公式,批量调整格式后点击保存即可完成操作。常用快捷键都做了适配,操作逻辑和主流 Excel 软件一致,学习成本很低。

该插件基于 MIT 许可证开源,允许自由使用、修改和分发。它提供了完整的格式工具栏,支持自定义字体颜色、背景颜色,支持撤销重做、行列插入删除、调整行高列宽等操作,保存时会重建整个 xlsx 文件避免格式损坏,多次保存也不会丢失样式。目前仅支持 DSH Web 平台,不支持其他代理客户端或框架。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-excel-panel

把 Melody-max114/dsh-excel-panel 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

📊 dsh-excel-panel

DSH 右侧栏 Excel 编辑插件:在 dsh-better-sidebar 中直接预览、编辑和保存 .xlsx 文件。

License Platform Version

简介

dsh-excel-panel 是一个面向 DSH Web 的右侧栏插件,让你不用离开聊天界面就能:

  • 打开 .xlsx 文件并直接编辑单元格
  • 像 Excel 一样操作工作表、合并单元格、调整字体样式
  • 实时预览公式计算结果
  • 一键保存回原文件

✨ 功能特性

交互

  • 单击选中单元格
  • 双击编辑文字
  • 点击空白处取消选中
  • 拖动 / Shift+点击多选范围
  • 多选范围使用淡蓝色半透明叠加,不遮挡单元格底色

格式工具栏

  • 字体大小下拉框
    • 多选时如果字体大小不一致,显示空白“字号”
  • 加粗 B / 斜体 I / 下划线 U
    • 多选时能识别统一状态
  • 左对齐 / 居中 / 右对齐
  • 字体颜色菜单
    • 20 个标准色
    • 自定义颜色:5 个自定义色块 + RGB 滑块 + HEX 输入
  • 背景颜色菜单
    • 20 个标准色
    • 自定义颜色:5 个自定义色块 + RGB 滑块 + HEX 输入

自定义颜色

  • 左键点击自定义色块:直接使用该颜色
  • 右键点击自定义色块:打开内嵌色盘设置颜色
  • 色盘内支持:
    • 40 个快速选色
    • RGB 三通道滑块
    • HEX 输入框
    • 预览色块
    • ✓ 确认按钮

单元格与工作表

  • 公式栏 fx
  • 公式实时推导:
    • + - * / ^、单元格/区域引用
    • SUM、ROUND、IF、MAX、MIN、AVERAGE、COUNT、ABS、INT、LEN、UPPER、LOWER
  • 合并 / 取消合并
  • 插入 / 删除行和列
  • 列宽 / 行高拖拽调整
  • 底部 Sheet 栏 + 新建工作表
  • 右键菜单:复制 / 粘贴 / 清除 / 合并 / 插入删除行列

保存

  • 每次保存都会重建整个 xlsx,避免样式表逐步损坏
  • 多次保存格式不丢失
  • 保存失败时提示具体原因
  • 文件被占用时提供“关闭占用程序并重试”

撤销 / 重做

  • Ctrl+Z 撤销
  • Ctrl+Y / Ctrl+Shift+Z 重做

📦 安装

方式一:npm 安装(推荐)

dsh plugin --profile web add dsh-excel-panel

或者直接安装到项目:

npm install dsh-excel-panel

方式二:本地 file 依赖

将插件目录放到本地,例如:

D:\apps\DP专武\dsh-excel-panel

在 DSH profile 目录(通常为 ~/.dsh/profiles/web)执行:

dsh plugin --profile web add file:D:/apps/DP专武/dsh-excel-panel

方式三:zip 包安装

从 GitHub Releases 下载 dsh-excel-panel-v0.6.1.zip,解压到任意目录,再按方式一添加 file 依赖即可。

🚀 使用

  1. 重启 DSH Web。
  2. 在右侧栏打开任意 .xlsx 文件。
  3. 单击选中单元格,双击编辑文字;也可以在上方 fx 栏输入公式,例如 =D2*0.15。
  4. 多选范围后,使用格式工具栏批量调整字体、颜色、对齐等。
  5. 点击右上角「保存」写回磁盘原文件。

⌨️ 快捷键

快捷键 功能
Ctrl+Z 撤销
Ctrl+Y / Ctrl+Shift+Z 重做
按住 Shift 点击 选择范围
鼠标拖动 选择范围
双击 编辑单元格
Enter 编辑时确认并下移
Tab 编辑时右移

🧩 插件结构

dsh-excel-panel/
├── package.json
├── cordis.patch.yml
├── README.md
├── CHANGELOG.md
├── DEBUG_V2.md
└── lib/
    ├── index.js      # 后端:读取/写入 xlsx
    └── client.js     # 前端:Excel 编辑器 UI

🔌 后端接口

方法 路径 说明
POST /excel-panel/read 读取 xlsx,返回单元格数据、公式、样式、合并区域
POST /excel-panel/write 重建并写回 xlsx
POST /excel-panel/unlock 关闭占用目标文件的进程
POST /excel-panel/log 写入操作日志

⚙️ 开发

# 修改后检查语法
node --check lib/index.js
node --check lib/client.js

# 同步到 profile 运行目录
cp -r lib ~/.dsh/profiles/web/node_modules/dsh-excel-panel/

📄 License

当前仓库使用 MIT,允许自由使用、修改和分发。

← 上一个 Prev dsh-plugin-manager 下一个 Next dsh-easycode →