office-recalculate
GitHub使用 LibreOffice Kit CLI 刷新电子表格公式缓存,并验证计算结果。通过 openpyxl 双重检查确保公式存活且数据准确,保持原文件结构,适用于需要重新计算和校验 Excel 内容的场景。
Trigger Scenarios
Install
npx skills add deepseek-ai/deepseek-harness --skill office-recalculate -g -y
SKILL.md
Frontmatter
{
"name": "office-recalculate",
"description": "Refresh spreadsheet formula caches and verify calculated values with LibreOffice Kit."
}
Recalculate spreadsheet formulas
Use the installed LibreOffice Kit CLI through the shell with the absolute Node and CLI paths supplied below. In Bash, invoke "<node>" "<cli>"; in PowerShell, invoke & "<node>" "<cli>". Prefer bundled LibreOffice unless the user requests another installation. If the Office sidecar is missing, follow sidecar setup: ask whether the user wants to download it and install only after they agree. Do not invoke system soffice, use npx, or install a replacement to work around a failed recalculation with an installed sidecar.
Keep the original workbook and write a new file in the task workspace. Quote each input and output path.
"<node>" "<cli>" recalculate --input <workbook.xlsx> --output <recalculated.xlsx>
Verify the saved result with openpyxl, using load_workspace_dependencies for the Python path unless a project environment is required. Open it with both data_only=False and data_only=True. Check that formulas survive and cached results match the requested logic, expected totals, and cell types. Check required unchanged sheets, styles, and data. Recalculation does not validate business logic or guarantee Excel-specific feature compatibility.
If no supported recalculation engine is available or the command fails, preserve the workbook and explain that calculated values could not be refreshed. Do not replace requested formulas with constants or present stale/absent caches as fresh results. Deliver the verified output through present when available, keeping the file in place.
Version History
- 687f282 Current 2026-10-18 17:47


