Format Conversion
Remplit des formules par colonne et peut verrouiller les cellules de formule
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-formula-injector' \
-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-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='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-formula-injector| Nom | Type | Requis | Description |
|---|---|---|---|
| workbookFile | fileupload requis | Oui | — |
| formulaRulesJson | textarea | Oui | — |
| editableRangesJson | textarea | Non | — |
| protectSheets | checkbox | Non | — |
| lockFormulaCells | checkbox | Non | — |
| hideFormulaText | checkbox | Non | — |
| sheetPassword | text | 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-formula-injector": {
"name": "xlsx-formula-injector",
"description": "Remplit des formules par colonne et peut verrouiller les cellules de formule",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-formula-injector",
"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-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": ""
}
}
}Des questions ou un problème ? Contactez [email protected]