Introduction

In DSH Desktop Edition, the built-in Office skills tend to generate files. This can lead to files being locked, formatting being distorted, and no real-time preview. dsh-office solves this problem through the COM interface.

What Is It

DeepSeek Harness Office plugin (Windows): AI directly edits documents in the Word / Excel / PowerPoint you already have open. Changes appear in the window in real time, and you can edit at the same time; read structure, batch edit, render to images for verification, and save.

The plugin is maintained by copylee711 and is open source (MIT). It solves the problems that the default Office skills cannot operate on open documents and that formatting is easy to lose, by calling Office automation interfaces (COM) so the application itself performs the modifications.

Core Features

Real-Time Collaboration and Editing

The plugin lets AI directly modify an open document. It can modify the file even while it is open; changes appear in the window in real time, so you can watch and edit together. AI only writes to the file when it calls Save; it does not close the document for you.

It continues normally even if the Office window is blocked or in the background, so you can use the computer for other tasks at the same time. When the AI rewrites or deletes a paragraph, it must include the opening text. A batch of modifications in Word is treated as one undo step, so pressing Ctrl+Z once reverts the entire batch.

Formatting and Layout Control

The plugin supports changing the style itself (font, font size, line spacing, automatic numbering), so all paragraphs that use it change together. Set page size, margins, page numbers, headers, table of contents, and force a specific paragraph to start on a new page.

For papers and documents, it supports three-line tables and table formatting, standardized figure/table captions (automatic numbering, centered, table caption above the table and figure caption below the figure), removal of extra space before figures/tables, and table page breaks (header row repeats on the next page, and a single row is not split across two pages).

Equations, Citations, and References

It supports native equations: AI writes LaTeX in the text using $...$ (inline) and $$...$$ (standalone line), and Word’s own LaTeX parser turns them into native equations. It supports citations and references: write \cite{1} in the text to create a superscript [1]; hold Ctrl and click to jump to the corresponding reference.

Excel Data Processing and Analysis

Long tables do not need to be read row by row: for tables with more than 60 rows, the plugin automatically provides a summary for each column (how many numeric, text, date, and blank values, minimum, median, maximum, and notable points). It supports cleaning (trim spaces, remove substrings, unify uppercase/lowercase, read “¥1,299” as a number, read “2025/3/1” as a date), replacement, filling blanks, deleting duplicate rows, deleting rows by condition, sorting, filtering, and copying ranges.

It supports data analysis: add columns and populate formulas, create pivot tables, and add charts (column, bar, stacked, line, pie, donut, scatter, area, radar, and combo). During rendering checks, the plugin can view regions that contain charts.

PowerPoint Presentation Generation

The plugin can generate fully formatted slides. Instead of manually positioning text boxes, AI first selects a theme (five light themes: ink, paper, ocean, forest, graphite; three dark themes: night, chalk, plum), then uses the slide directive to generate a complete page—cover, table of contents, section page, key points, cards, data, charts, tables, equation cards, timeline, process, comparison, full-bleed image, quote, and ending page.

It supports more layouts and a freeform canvas (theorem/definition page, figure group page, summary page, two-page spread, code page, canvas). It supports image cropping (for tall images, keep the upper portion), slide diagrams and tables (native SmartArt, native tables, common shapes, and connectors).

Other Capabilities

  • Batch editing: office_edit executes a batch of modifications sequentially in one call; if one item fails midway, it stops and reports which items have been completed.
  • Reading structure and checking layout: office_read reads the open document into text (paragraphs/cells/shapes), and office_render renders a page/slide/cell range into an image for the model to verify.
  • Zero-install dependencies: On first use, it compiles a small helper with the Windows built-in .NET Framework csc.exe (about 1 second, then cached); no Python, LibreOffice, or node-gyp is required.

Installation and Enablement

Installation command (web profile):

dsh plugin --profile web add @copylee/dsh-office@latest

Environment requirements:
- Operating system: Windows 10 / 11 (with .NET Framework 4.8 included).
- Software: Microsoft Office (Word, Excel, PowerPoint; whichever is installed can be used) or WPS Office (Writer, Spreadsheet, Presentation).
- DSH version: 0.2.0-rc.2 or later.

On first use, the plugin automatically invokes the Windows built-in csc.exe to compile a small helper (about 1 second, then cached). No additional Python or node-gyp environment is required.

Typical Usage

Simply state what you want to do; AI will use Office’s capabilities to execute it:

  • Use Word to write a quarterly work summary and save it to the desktop
  • Open D:\Data\Sales.xlsx, add an amount column and compute a total in the last row, then draw a column chart
  • Shorten the title on page 3 of the PPT I currently have open, and change the body text into three bullet points

Applicable Scenarios and Notes

Applicable scenarios:
- Document writing that must preserve formatting (papers, reports).
- Scenarios requiring real-time collaboration on an open document.
- Scenarios requiring large-scale Excel data processing, cleaning, and analysis.
- Scenarios requiring quick generation of PPT presentations.

Notes:
- Windows only.
- When the AI rewrites or deletes a paragraph, it must include the opening text.
- For pure Excel data processing at this time, AI is allowed to use Python (when the workbook is not open).
- Incorrect parameters will be pointed out; if an unrecognized field appears in an operation, the result will explicitly name which field was ignored.

Short Ending

dsh-office is a practical plugin in the DSH ecosystem for handling Office documents. It uses the COM interface to let AI directly operate on open documents, achieving real-time collaboration, format preservation, and batch processing. For users who need to use Office deeply in a Windows environment, it is a tool that lowers the barrier and improves efficiency.

Plugin directory: https://www.skillhub.cn/plugins/copylee711/dsh-office
GitHub repository: https://github.com/copylee711/dsh-office