分类

XLSX 公式注入器

按列批量填充公式,并可锁定公式单元格用于模板保护和只读区域

支持行占位符公式、可编辑输入区、工作表保护和隐藏公式文本,适合预算表、报价单和业务模板。

示例结果

1 个示例

注入利润公式并保护工作表

填充计算列,保留输入区可编辑并锁定公式列

xlsx-formula-injector-example1.xlsx 查看文件
查看输入参数
{ "workbookFile": "/public/samples/xlsx/workbook-sales.xlsx", "formulaRulesJson": "[\n {\n \"sheetName\": \"Sheet1\",\n \"targetColumn\": \"D\",\n \"startRow\": 2,\n \"endRow\": 12,\n \"formulaTemplate\": \"=IF($A{{row}}=\\\"\\\",\\\"\\\",$B{{row}}*$C{{row}})\",\n \"numberFormat\": \"#,##0.00\",\n \"styleSourceRow\": 2\n }\n]", "editableRangesJson": "[\n {\n \"sheetName\": \"Sheet1\",\n \"range\": \"A2:C12\"\n }\n]", "protectSheets": true, "lockFormulaCells": true, "hideFormulaText": false, "sheetPassword": "" }

Click to upload file or drag and drop file here

Maximum file size: 20MB Supported formats: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel

API 文档

请求端点

POST /zh/api/tools/xlsx-formula-injector

请求参数

参数名 类型 必填 描述
workbookFile file (需要先上传) -
formulaRulesJson textarea -
editableRangesJson textarea -
protectSheets checkbox -
lockFormulaCells checkbox -
hideFormulaText checkbox -
sheetPassword text -

文件类型参数需要先通过 POST /upload/xlsx-formula-injector 上传获取 filePath,然后将 filePath 传递给对应的文件字段。

响应格式

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
文件: 文件

AI MCP 文档

将此工具添加到您的 MCP 服务器配置中:

{
  "mcpServers": {
    "elysiatools-xlsx-formula-injector": {
      "name": "xlsx-formula-injector",
      "description": "按列批量填充公式,并可锁定公式单元格用于模板保护和只读区域",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xlsx-formula-injector",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。

支持 URL 文件链接或 Base64 编码作为文件参数。

如果遇见问题,请联系我们:[email protected]