分类

XLSX 动态报表构建器

编程式构建多级合并表头、分组小计、动态列报表

支持 JSON 数据输入、列分组、分组小计和总计输出。

示例结果

1 个示例

构建动态分组报表

生成多级表头、分组小计与总计的动态报表

xlsx-dynamic-report-builder-example1.xlsx 查看文件
查看输入参数
{ "dataJson": "[\n {\n \"region\": \"APAC\",\n \"dept\": \"Sales\",\n \"revenue\": 12000,\n \"cost\": 7200,\n \"profit\": 4800\n },\n {\n \"region\": \"APAC\",\n \"dept\": \"Ops\",\n \"revenue\": 8000,\n \"cost\": 5200,\n \"profit\": 2800\n },\n {\n \"region\": \"EMEA\",\n \"dept\": \"Sales\",\n \"revenue\": 15000,\n \"cost\": 8600,\n \"profit\": 6400\n },\n {\n \"region\": \"EMEA\",\n \"dept\": \"Ops\",\n \"revenue\": 9000,\n \"cost\": 5700,\n \"profit\": 3300\n }\n]", "groupBy": "region", "fixedColumns": "region,dept", "valueColumns": "revenue,cost,profit", "headerGroupsJson": "{\n \"Organization\": [\n \"region\",\n \"dept\"\n ],\n \"Financials\": [\n \"revenue\",\n \"cost\",\n \"profit\"\n ]\n}", "includeGrandTotal": true, "sheetName": "Dynamic Report" }

API 文档

请求端点

POST /zh/api/tools/xlsx-dynamic-report-builder

请求参数

参数名 类型 必填 描述
dataJson textarea -
groupBy text -
fixedColumns text -
valueColumns text -
headerGroupsJson textarea -
includeGrandTotal checkbox -
sheetName text -

响应格式

{
  "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-dynamic-report-builder": {
      "name": "xlsx-dynamic-report-builder",
      "description": "编程式构建多级合并表头、分组小计、动态列报表",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xlsx-dynamic-report-builder",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

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

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