Format Conversion
Заполняет формулы по столбцам и может блокировать формульные ячейки в защищенных шаблонах
Вызовите этот инструмент из своего кода на трёх языках.
# 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/ru/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='Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/xlsx-formula-injector| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| workbookFile | fileнужна загрузка | Да | — |
| formulaRulesJson | textarea | Да | — |
| editableRangesJson | textarea | Нет | — |
| protectSheets | checkbox | Нет | — |
| lockFormulaCells | checkbox | Нет | — |
| hideFormulaText | checkbox | Нет | — |
| sheetPassword | text | Нет | — |
Файловый результат
{
"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)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-xlsx-formula-injector": {
"name": "xlsx-formula-injector",
"description": "Заполняет формулы по столбцам и может блокировать формульные ячейки в защищенных шаблонах",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-formula-injector",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"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": ""
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]