Format Conversion
Fetch JSON from REST or GraphQL API and write mapped records into an Excel sheet with automatic pagination
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/xlsx-api-to-sheet' \
-H 'Content-Type: application/json' \
-d '{"sourceType":"rest","url":"https://elysiatools.com/zh/api/tools","method":"GET","headers":"{\"Authorization\":\"Bearer xxx\"}","queryParams":"{\"status\":\"active\"}","body":"{\"filters\":{\"status\":\"active\"}}","graphqlQuery":"query($page:Int,$limit:Int){ items(page:$page,limit:$limit){ id name } }","graphqlVariables":"{\"status\":\"active\"}","dataPath":"tools","paginationType":"none","maxPages":50,"pageParam":"page","pageStart":1,"pageSizeParam":"limit","pageSize":100,"offsetParam":"offset","offsetStart":0,"cursorParam":"cursor","cursorStart":"","hasMorePath":"data.pageInfo.hasNextPage","nextCursorPath":"pageInfo.endCursor","totalPagesPath":"meta.totalPages","fieldMapping":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"category\": \"category\",\n \"result_type\": \"resultType\",\n \"featured\": \"featured\",\n \"last_updated\": \"lastUpdated\"\n}","sheetName":"Tools API","outputFileName":"api-export"}'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-api-to-sheet| Name | Type | Required | Description |
|---|---|---|---|
| sourceType | select | No | — |
| url | text | Yes | — |
| method | select | No | — |
| headers | textarea | No | — |
| queryParams | textarea | No | — |
| body | textarea | No | — |
| graphqlQuery | textarea | No | — |
| graphqlVariables | textarea | No | — |
| dataPath | text | No | — |
| paginationType | select | No | — |
| maxPages | number | No | — |
| pageParam | text | No | — |
| pageStart | number | No | — |
| pageSizeParam | text | No | — |
| pageSize | number | No | — |
| offsetParam | text | No | — |
| offsetStart | number | No | — |
| cursorParam | text | No | — |
| cursorStart | text | No | — |
| hasMorePath | text | No | — |
| nextCursorPath | text | No | — |
| totalPagesPath | text | No | — |
| fieldMapping | textarea | No | — |
| sheetName | text | No | — |
| outputFileName | 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-api-to-sheet": {
"name": "xlsx-api-to-sheet",
"description": "Fetch JSON from REST or GraphQL API and write mapped records into an Excel sheet with automatic pagination",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-api-to-sheet",
"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-api-to-sheet",
"arguments": {
"sourceType": "rest",
"url": "https://elysiatools.com/zh/api/tools",
"method": "GET",
"headers": "{\"Authorization\":\"Bearer xxx\"}",
"queryParams": "{\"status\":\"active\"}",
"body": "{\"filters\":{\"status\":\"active\"}}",
"graphqlQuery": "query($page:Int,$limit:Int){ items(page:$page,limit:$limit){ id name } }",
"graphqlVariables": "{\"status\":\"active\"}",
"dataPath": "tools",
"paginationType": "none",
"maxPages": 50,
"pageParam": "page",
"pageStart": 1,
"pageSizeParam": "limit",
"pageSize": 100,
"offsetParam": "offset",
"offsetStart": 0,
"cursorParam": "cursor",
"cursorStart": "",
"hasMorePath": "data.pageInfo.hasNextPage",
"nextCursorPath": "pageInfo.endCursor",
"totalPagesPath": "meta.totalPages",
"fieldMapping": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"category\": \"category\",\n \"result_type\": \"resultType\",\n \"featured\": \"featured\",\n \"last_updated\": \"lastUpdated\"\n}",
"sheetName": "Tools API",
"outputFileName": "api-export"
}
}
}Questions or issues? Contact [email protected]