DSH Excel Diff Comparison Add-in

Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin”—developers can extend the capability boundaries of agents through plugins. When building agents for data validation or change tracking, comparing the differences between two Excel spreadsheets is a common requirement. Traditional approaches rely on manual comparison or writing custom scripts, which are inefficient and prone to overlooking details. While the DSH plugin ecosystem already includes a CSV comparison tool, working with Excel files typically requires third-party libraries or custom implementations. This article introduces a DSH plugin purpose-built for Excel diff comparison. It encapsulates the diff-comparison capability into a standard plugin that developers can invoke directly.

Plugin Overview

  • Plugin Name: dsh-xlsx-diff (@deepwhale-cn/dsh-xlsx-diff)
  • Maintainer: feely0208
  • Core Functionality: Compares two Excel files by a key column and lists added, removed, and modified rows (column-by-column differences; before→after)
  • Implementation: openpyxl

Installation & Activation

Install the plugin in your DSH environment using the official installation command:

dsh plugin --profile web add @deepwhale-cn/dsh-xlsx-diff

Once installed, the plugin is available for use in DSH workflows. You can also install it directly via npm:

npm i @deepwhale-cn/dsh-xlsx-diff

Or install directly from the repository:

dsh plugin install ./

Usage

After installation, invoke the plugin in your DSH workflow to perform Excel comparison. The command format is as follows:

npx @deepwhale-cn/dsh-xlsx-diff --a 旧.xlsx --b 新.xlsx --key 单号 [--json] [--out 报告.md]

Parameters:
- --a 旧.xlsx: Specifies the old Excel file to compare
- --b 新.xlsx: Specifies the new Excel file to compare
- --key 单号: Specifies the key column for comparison (must exist in both Excel files)
- --json: Optional; output in JSON format
- --out 报告.md: Optional; write the diff report to a specified Markdown file

Exit code rules:
- No differences → 0 (suitable for CI pipelines)
- Differences found → non-zero

Dependencies & Limitations

  • Dependencies: Requires @deepwhale-cn/dsh-guard-core
  • DSH Version: >=0.1.0-rc.6 <0.3.0
  • Node Version: >=18
  • CSV Comparison: For comparing CSV files, use the dsh-csv-diff plugin instead

Important Notes

  • The plugin runs with the permissions of the current DSH process—review the source code and license before installation
  • Comparison depends on the specified key column existing in both Excel files; otherwise, it may fail
  • The diff report displays before→after changes column by column, making it easy to pinpoint exactly what changed

Value Summary

This plugin standardizes Excel diff comparison as a first-class DSH plugin. Developers no longer need to implement openpyxl logic themselves—simply invoking it in a workflow is all it takes to complete a full diff analysis. It returns exit code 0 when no differences are found, making it ideal for integration into automation pipelines.

  • Plugin Directory: https://www.skillhub.cn/plugins/feely0208/dsh-xlsx-diff
  • GitHub Repository: https://github.com/feely0208/dsh-xlsx-diff
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye