Format Conversion
Configura papel, margenes, escala, titulos repetidos y encabezado/pie
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/xlsx-print-setup-pack' \
-F 'file=@/path/to/workbookFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/es/api/tools/xlsx-print-setup-pack' \
-F 'workbookFile=/public/samples/xlsx/finance-source.xlsx' \
-F 'sheetNames=Sheet1,Sheet2 (blank = all sheets)' \
-F 'paperSize=a4' \
-F 'orientation=landscape' \
-F 'marginsJson={
"top": 0.5,
"bottom": 0.45,
"left": 0.3,
"right": 0.3,
"header": 0.2,
"footer": 0.2
}' \
-F 'scalePercent=100' \
-F 'fitToWidth=1' \
-F 'fitToHeight=0' \
-F 'repeatTitleRows=1:2' \
-F 'repeatTitleColumns=A:B' \
-F 'printArea=A1:H60' \
-F 'headerText=&LFinance Pack&CQ1 Summary&RPage &P of &N' \
-F 'footerText=&LInternal Use Only&R&D' \
-F 'horizontalCentered=false' \
-F 'verticalCentered=false' \
-F 'showGridLines=false'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-print-setup-pack| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| workbookFile | filesubida requerida | Sí | — |
| sheetNames | text | No | — |
| paperSize | select | No | — |
| orientation | select | No | — |
| marginsJson | textarea | No | — |
| scalePercent | number | No | — |
| fitToWidth | number | No | — |
| fitToHeight | number | No | — |
| repeatTitleRows | text | No | — |
| repeatTitleColumns | text | No | — |
| printArea | text | No | — |
| headerText | text | No | — |
| footerText | text | No | — |
| horizontalCentered | checkbox | No | — |
| verticalCentered | checkbox | No | — |
| showGridLines | checkbox | 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-print-setup-pack": {
"name": "xlsx-print-setup-pack",
"description": "Configura papel, margenes, escala, titulos repetidos y encabezado/pie",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-print-setup-pack",
"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-print-setup-pack",
"arguments": {
"workbookFile": "/public/samples/xlsx/finance-source.xlsx",
"sheetNames": "Sheet1,Sheet2 (blank = all sheets)",
"paperSize": "a4",
"orientation": "landscape",
"marginsJson": "{\n \"top\": 0.5,\n \"bottom\": 0.45,\n \"left\": 0.3,\n \"right\": 0.3,\n \"header\": 0.2,\n \"footer\": 0.2\n}",
"scalePercent": 100,
"fitToWidth": 1,
"fitToHeight": 0,
"repeatTitleRows": "1:2",
"repeatTitleColumns": "A:B",
"printArea": "A1:H60",
"headerText": "&LFinance Pack&CQ1 Summary&RPage &P of &N",
"footerText": "&LInternal Use Only&R&D",
"horizontalCentered": false,
"verticalCentered": false,
"showGridLines": false
}
}
}¿Dudas o problemas? Contacta con [email protected]