generateJxlsTemplate
Create JXLS-compliant Excel templates using JSON or array data formats to define structure and variables for dynamic spreadsheet generation.
Instructions
根据输入参数生成符合JXLS规范的Excel模板文件
Input Schema
Name | Required | Description | Default |
---|---|---|---|
dataFormat | Yes | 数据格式类型 | |
dataStruct | Yes | 数据结构定义 | |
outputPath | No | 导出文件路径(可选) | |
sampleData | No | 示例数据(可选) | |
templateName | Yes | 模板文件名称 |
Input Schema (JSON Schema)
{
"properties": {
"dataFormat": {
"description": "数据格式类型",
"enum": [
"json",
"array"
],
"type": "string"
},
"dataStruct": {
"description": "数据结构定义",
"properties": {
"collectName": {
"description": "集合变量名称",
"minLength": 1,
"type": "string"
},
"dataFields": {
"description": "字段定义数组",
"items": {
"properties": {
"field": {
"description": "JSON格式字段名",
"type": "string"
},
"index": {
"description": "数组格式索引位置",
"minimum": 0,
"type": "integer"
},
"name": {
"description": "列标题显示名称",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"itemVariable": {
"description": "循环项变量名",
"minLength": 1,
"type": "string"
}
},
"required": [
"collectName",
"itemVariable",
"dataFields"
],
"type": "object"
},
"outputPath": {
"description": "导出文件路径(可选)",
"type": "string"
},
"sampleData": {
"description": "示例数据(可选)",
"items": {},
"type": "array"
},
"templateName": {
"description": "模板文件名称",
"maxLength": 100,
"minLength": 1,
"type": "string"
}
},
"required": [
"templateName",
"dataStruct",
"dataFormat"
],
"type": "object"
}