Format Conversion
Rellena formulas por columna y puede bloquear celdas de formula en plantillas protegidas
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/xlsx-formula-injector' \
-H 'Content-Type: application/json' \
-d '{"filename":"workbookFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/es/api/tools/xlsx-formula-injector' \
-F 'workbookFile=/public/samples/xlsx/workbook-sales.xlsx' \
-F 'formulaRulesJson=[
{
"sheetName": "Sheet1",
"targetColumn": "D",
"startRow": 2,
"endRow": 12,
"formulaTemplate": "=IF($A{{row}}=\"\",\"\",$B{{row}}*$C{{row}})",
"numberFormat": "#,##0.00",
"styleSourceRow": 2
}
]' \
-F 'editableRangesJson=[
{
"sheetName": "Sheet1",
"range": "A2:C12"
}
]' \
-F 'protectSheets=true' \
-F 'lockFormulaCells=true' \
-F 'hideFormulaText=false' \
-F 'sheetPassword='Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/xlsx-formula-injector| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| workbookFile | filesubida requerida | Sí | — |
| formulaRulesJson | textarea | Sí | — |
| editableRangesJson | textarea | No | — |
| protectSheets | checkbox | No | — |
| lockFormulaCells | checkbox | No | — |
| hideFormulaText | checkbox | No | — |
| sheetPassword | text | No | — |
Resultado de archivo
{
"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)"
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-xlsx-formula-injector": {
"name": "xlsx-formula-injector",
"description": "Rellena formulas por columna y puede bloquear celdas de formula en plantillas protegidas",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-formula-injector",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "xlsx-formula-injector",
"arguments": {
"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": ""
}
}
}¿Dudas o problemas? Contacta con [email protected]