Excel to JSON API by WTSolution Documentation

Excel to JSON API by WTSolution Documentation

Introduction

The Excel to JSON API provides a simple way to convert Excel and CSV data into JSON format. This API accepts tab-separated or comma-separated text data and returns structured JSON.

Endpoint

POST https://mcp.wtsolutions.cn/excel-to-json-api

Request Format

The API accepts POST requests with a JSON body containing the following parameter:

Parameter Type Required Description
data string Yes Tab-separated or comma-separated text data with at least two rows (header row + data row)

Example Request

json 复制代码
{
  "data": "Name\tAge\tIsStudent\nJohn Doe\t25\tfalse\nJane Smith\t30\ttrue"
}

Response Format

The API returns a JSON object with the following structure:

Field Type Description
isError boolean Indicates if there was an error processing the request
msg string Status message or error description
data array/object/null Converted JSON data (null if there was an error)

Example Success Response

json 复制代码
{
  "isError": false,
  "msg": "success",
  "data": [
    {
      "Name": "John Doe",
      "Age": 25,
      "IsStudent": false
    },
    {
      "Name": "Jane Smith",
      "Age": 30,
      "IsStudent": true
    }
  ]
}

Example Error Response

json 复制代码
{
  "isError": true,
  "msg": "At least 2 rows are required in Excel Data",
  "data": null
}

Data Type Handling

The API automatically detects and converts different data types:

  • Numbers: Converted to numeric values
  • Booleans: Recognizes 'true'/'false' (case-insensitive) and converts to boolean values
  • Dates: Detects various date formats and converts them appropriately
  • Strings: Treated as string values
  • Empty values: Represented as empty strings

Error Handling

The API returns descriptive error messages for common issues:

  • Excel Data Format Invalid: When input data is not tab-separated or comma-separated
  • At least 2 rows are required: When input data has fewer than 2 rows
  • Blank/Null/Empty cells in the first row not allowed: When header row contains empty cells
  • Server Internal Error: When an unexpected error occurs

Pricing

Free for now.

Donation

https://buymeacoffee.com/wtsolutions

相关推荐
情 九3 小时前
Dify HTTP 请求节点实战:发送 JSON、解析响应与处理异常
网络协议·http·json·dify
qq_白羊座11 小时前
口头说的 JSON 和 MySQL 里的 JSON
数据库·mysql·json
AAASilverwolf11 小时前
OpenAI 新增 12 小时提示缓存:跨小时任务能省多少?
人工智能·gpt·缓存·api
高频因子挖掘机12 小时前
A股量化第一步:如何利用 QuantDash 实现日K数据清洗、前复权校验与缺失值处理
后端·github·api
love静思冥想13 小时前
CLOB中JSON查询agent字段值(Oracle11g)
sql·oracle·json
Spatial3Ddddd13 小时前
博物馆做VR全景好看之外还要能留档
json·vr
cspttty15 小时前
2027采购岗求职:大数据管理与应用专业如何把Excel、SQL变成业务能力
excel
进击的雷神16 小时前
怕 AI Agent 乱删文件?Tank-OS 把它锁进不可变系统
人工智能·ai·api·agent
大鳥17 小时前
JSON 解析最佳实践:从入门到生产级优化
hive·sql·spark·json
高频因子挖掘机17 小时前
从第一行 Python 代码开始,个人量化项目应该先接入历史行情还是实时行情?
后端·github·api