Format Conversion
Fill formulas down worksheet columns and optionally lock formula cells for protected, template-friendly Excel workbooks
Call this tool from your code in three languages.
# 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/en/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='Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/xlsx-formula-injector| Name | Type | Required | Description |
|---|---|---|---|
| workbookFile | fileupload required | Yes | — |
| formulaRulesJson | textarea | Yes | — |
| editableRangesJson | textarea | No | — |
| protectSheets | checkbox | No | — |
| lockFormulaCells | checkbox | No | — |
| hideFormulaText | checkbox | No | — |
| sheetPassword | text | No | — |
File result
{
"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)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-xlsx-formula-injector": {
"name": "xlsx-formula-injector",
"description": "Fill formulas down worksheet columns and optionally lock formula cells for protected, template-friendly Excel workbooks",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-formula-injector",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"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": ""
}
}
}Questions or issues? Contact [email protected]