hyperformula-sheet
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "hyperformula-sheet" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-bec87f74b82ead4394fadb9c8b2295e080c66148a6a54d9b36348653fd1e0f94. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/pdx20267114 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
HyperFormula sheet skill: runs Excel formulas in the browser using HyperFormula, suitable for quotes, commission calculations, and other scenarios that need a frontend formula engine or table computations.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: hyperformula-sheet
slug: pdx20267114
displayName: Excel公式引擎
version: 1.0.0
summary: 用 HyperFormula 在浏览器本地执行 Excel 风格公式,算报价与分成。
license: MIT
description: 用 HyperFormula 在浏览器内运行 Excel 公式,用于报价表、分成试算等。当用户需要 Excel 公式引擎、HyperFormula、浏览器跑公式、前端表格计算时使用。Excel 公式引擎(HyperFormula)
灵感:能力工具箱 excel-formula(pkg: hyperformula)。
在浏览器里用 Excel 风格公式算报价/分成表,无需打开桌面 Excel,也不把整表丢到后端算。
何时使用
- 报价明细:数量 × 单价、合计、折扣
- 分成试算:
=A1*0.2一类规则 - 需要与 Excel 公式习惯对齐的前端计算
硬约束
- 依赖
hyperformula;计算在本地完成。 - 公式字符串来自可信配置或校验后的模板;对用户输入做长度/字符集约束。
- 错误单元格返回可读中文提示(如
#DIV/0!→「除零」),勿裸抛。 - 金额展示可与
currency.jsSkill 配合,本包专注公式求值。 - 实现要点可标 小四原创。
实现要点(小四原创)
import { HyperFormula } from 'hyperformula'
// 小四原创:一张小表跑 Excel 公式
export function evalQuoteSheet(rows: (string | number)[][]) {
const hf = HyperFormula.buildFromArray(rows, { licenseKey: 'gpl-v3' })
const sheetId = 0
const height = rows.length
const width = Math.max(...rows.map((r) => r.length), 0)
const values: (string | number | boolean)[][] = []
for (let r = 0; r < height; r++) {
const line: (string | number | boolean)[] = []
for (let c = 0; c < width; c++) {
const v = hf.getCellValue({ sheet: sheetId, row: r, col: c })
line.push(typeof v === 'object' && v && 'type' in (v as object) ? '#ERR' : (v as any))
}
values.push(line)
}
return { values, destroy: () => hf.destroy() }
}
// 例:[['数量','单价','金额'],[2,99.9,'=A2*B2']]
Agent 步骤
- 安装
hyperformula,封装evalQuoteSheet。 - 自测:
=SUM、乘积、百分比;坏公式有中文/友好错误。 - UI:表格编辑单元格后重算;注意销毁实例。
附加
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供浏览器端 Excel 公式计算能力,解决报价表、分成试算等实际业务场景
- 明确区分与 currency.js 的协作边界,专注公式求值核心功能
Highlights
- 触发词覆盖 Excel 公式引擎、HyperFormula、前端表格计算等多个维度
- 场景描述具体,边界清晰,不易与其他 Skill 混淆
Areas to improve
-
缺少明确的 Phase 划分和出口条件 Reported severity: Minor
文档结构良好但缺少标准化的 Phase 步骤划分和明确的出口条件描述
Recommendation: 建议补充 Phase 1/2/3 等标准步骤划分,并明确每个阶段的完成条件和出口标准
Highlights
- 包含完整的 frontmatter 信息,版本、许可证等元数据齐全
- 提供了可运行的 TypeScript 代码示例和具体使用场景说明
Areas to improve
-
异常处理覆盖不全 Reported severity: Minor
核心函数对输入数据格式错误、licenseKey 无效等异常情况处理不足
Recommendation: 建议增加输入参数校验、licenseKey 有效性检查等异常处理逻辑
Highlights
- 实现了基本的错误处理机制,将公式错误转换为友好提示
- 包含实例销毁机制,避免内存泄漏
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.