Introduction¶
The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” Handling Excel files in a Web environment typically requires downloading them locally, editing them, and uploading them again, or integrating complex third-party components. dsh-plugin-spreadjs-editor embeds GrapeCity’s SpreadJS Designer directly into the file tree on the right side of the DSH Web UI, allowing users to view and edit workbooks without leaving the browser.
Plugin Overview¶
- Name:
grapecityxa/dsh-plugin-spreadjs-editor - Owner: GrapeCityXA
- Category: Client
- License: The plugin code is licensed under the MIT License. The built-in SpreadJS and Designer require commercial licenses (trial mode is used if not configured).
- Core Value: Provides an atomic save mechanism, session workspace constraints, and conflict detection to integrate Excel editing into DSH workflows.
Installation and Prerequisites¶
Use the DSH CLI to install the plugin. Ensure that the host DSH version is no lower than 0.1.5-rc.3.
- Run the installation command:
dsh plugin --profile web add @grapecity-software/dsh-spreadjs-editor
- Start DSH:
dsh --profile web
- Open
.xlsx,.xlsm,.csv,.sjs, or.ssfiles in the file tree on the right side of the Web UI to use the editor.
Core Features¶
The plugin includes built-in SpreadJS and Designer, providing the following core capabilities:
- File Support: Supports
.xlsx,.xlsm,.csv,.sjs, and.ssformats. - Editing and Viewing: Open workbooks directly from the file tree and edit spreadsheets using SpreadJS Designer.
- Save Mechanism:
- Atomic Writes: Overwrites by renaming a temporary file, ensuring write integrity.
- Conflict Detection: Compares file hashes before saving to prevent overwriting external modifications.
- Session Constraint: Allows saving only within the current session workspace to prevent out-of-bounds writes.
- UI Interaction: The save button is located in the DSH document header toolbar. A marker point appears before the button when there are unsaved changes. The
Ctrl+Sshortcut is also supported.
- Save As:
- Writes the workbook to another path in the workspace and switches to that file in place after success.
- Does not overwrite files with the same name; prompts the user to rename.
- Theme Following: The editor automatically follows DSH’s light/dark theme.
- About Information: Includes an “About” button in the editor’s “Settings” tab, displaying the built-in version and license status.
Usage Guide¶
- Open a File: Double-click the target file in the file tree on the right side of the Web UI.
- Save Changes: After editing, click the “Save” button in the document header toolbar or press
Ctrl+S. A marker point appears before the button when there are unsaved changes. - Save As: Click “Save As…” to copy the workbook to another location in the workspace and switch the tab.
Configuration and Notes¶
- DSH Version Requirement: DSH
>=0.1.5-rc.3is required. Lower versions cannot use the document header action slot, and the save entry may be restricted. - Hidden Designer Tab: The “File” tab built into Designer is hidden from the Ribbon to avoid confusion with the save button in the DSH header.
- Unsaved State Handling:
- If you switch away and back or close the tab, unsaved changes are not lost (implemented through caching).
- If the file on disk has been modified externally, a notice appears in the lower right corner of the panel: “Unsaved change cache exists, but the file has already been modified on disk.” You can choose to restore or discard.
- License Configuration: For production deployment, configure
licenseKeyanddesignerLicenseKeyincordis.patch.ymlfor theweb profile.
- id: spreadjs-editor
config:
licenseKey: 'YOUR_SPREADJS_KEY'
designerLicenseKey: 'YOUR_DESIGNER_KEY'
maxSaveBytes: 67108864
trustedHosts: []
Conclusion¶
By integrating SpreadJS into the DSH right sidebar, this plugin solves the Excel editing integration problem in Web environments. Combined with DSH’s native save mechanism and conflict detection, it is suitable for scenarios that require direct Excel manipulation within agent workflows.
- Catalog Page: DSH Plugin Catalog
- Source Code: GitHub