首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Excel to JSON API by WTSolution Documentation

Excel to JSON API by WTSolution Documentation

作者头像
WTSolutions
发布2025-07-13 09:08:37
发布2025-07-13 09:08:37
1310
举报
文章被收录于专栏:WTSolutionsWTSolutions

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
代码语言:javascript
复制
{
  "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
代码语言:javascript
复制
{
  "isError": false,
  "msg": "success",
  "data": [
    {
      "Name": "John Doe",
      "Age": 25,
      "IsStudent": false
    },
    {
      "Name": "Jane Smith",
      "Age": 30,
      "IsStudent": true
    }
  ]
}
Example Error Response
代码语言:javascript
复制
{
  "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

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2025-07-13,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Excel to JSON API by WTSolution Documentation
    • Introduction
    • Endpoint
    • Request Format
      • Example Request
    • Response Format
      • Example Success Response
      • Example Error Response
    • Data Type Handling
    • Error Handling
    • Pricing
    • Donation
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档