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

相关推荐
秃了也弱了。4 小时前
FASTJSON库:阿里出品java界json解析库,使用与踩坑记录
java·开发语言·json
hacker7074 小时前
精进Excel图表:AI赋能,成为Excel图表高手
人工智能·信息可视化·excel
Data-Miner6 小时前
结合AI Agent的excel大数据处理技巧
人工智能·excel
如意机反光镜裸6 小时前
批量处理Excel数据
excel·批量处理
dyxal6 小时前
Excel情感标注工具性能优化实战:从卡顿到流畅的蜕变
网络·性能优化·excel
..过云雨6 小时前
应用层自定义协议与序列化一站式指南
网络协议·tcp/ip·json·信息与通信
Non-existent9876 小时前
Excel/CSV转GIS:一键WKT转gdf、Shapefile等图层
信息可视化·excel
dyxal7 小时前
Excel情感标注工具:用Python+Flask打造高效数据标注平台
python·flask·excel
eggcode7 小时前
C#读写Bson格式的文件
c#·json·bson
电商API&Tina8 小时前
电商数据采集 API:驱动选品、定价、运营的数据分析核心引擎
大数据·开发语言·人工智能·python·数据分析·json