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

相关推荐
眠りたいです1 天前
基于脚手架微服务的视频点播系统-脚手架开发部分-jsoncpp,protobuf,Cpp-httplib与WebSocketpp中间件介绍与使用
c++·websocket·微服务·中间件·json·protobuf·cpp-httplib
未来之窗软件服务1 天前
万象EXCEL开发(十)excel 高级混合查询 ——东方仙盟金丹期
excel·仙盟创梦ide·东方仙盟·万象excel
njsgcs1 天前
excel-mcp-server 安装
excel·mcp
我是大头鸟1 天前
XMLHttpRequest 发送json 格式的数据,servlet 接收
servlet·json·xmlhttprequest
未来之窗软件服务2 天前
万象EXCEL开发(九)excel 高级混合查询 ——东方仙盟金丹期
大数据·excel·仙盟创梦ide·东方仙盟·万象excel
深耕AI应用2 天前
元表纪基于一个Excel表实现一键发货、打印面单
excel·表格一键发货·自动打印运单·自动打印面单·自动发货
专注VB编程开发20年2 天前
EXCEL VBA-从X行复制数据插入到Y_Z行
excel·复制数据·vba·插入数据·函数优化
小Tomkk2 天前
一个学校随机点名系统(代excel 自定义导入名字,+随机点名)
excel
万邦科技Lafite2 天前
如何对接API接口?需要用到哪些软件工具?
java·前端·python·api·开放api·电商开放平台
程序新视界2 天前
一篇文章详解你不知道的MySQL JSON数据类型
数据库·mysql·json