Format Conversion
Configure papier, marges, echelle, titres repetes et entete/pied
Appelez cet outil depuis votre code en trois langages.
# 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/fr/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'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/xlsx-print-setup-pack| Nom | Type | Requis | Description |
|---|---|---|---|
| workbookFile | fileupload requis | Oui | — |
| sheetNames | text | Non | — |
| paperSize | select | Non | — |
| orientation | select | Non | — |
| marginsJson | textarea | Non | — |
| scalePercent | number | Non | — |
| fitToWidth | number | Non | — |
| fitToHeight | number | Non | — |
| repeatTitleRows | text | Non | — |
| repeatTitleColumns | text | Non | — |
| printArea | text | Non | — |
| headerText | text | Non | — |
| footerText | text | Non | — |
| horizontalCentered | checkbox | Non | — |
| verticalCentered | checkbox | Non | — |
| showGridLines | checkbox | Non | — |
Résultat fichier
{
"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)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-xlsx-print-setup-pack": {
"name": "xlsx-print-setup-pack",
"description": "Configure papier, marges, echelle, titres repetes et entete/pied",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-print-setup-pack",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"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
}
}
}Des questions ou un problème ? Contactez [email protected]