全球免费使用

Excel 转 JSON 转换器(XLSX 转 JSON)

将 Excel 工作表转换为以首行作为键的 JSON 对象数组,或转换为行数组,可直接用于 API 或网站。

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

输入

提示:按 Ctrl + Enter 运行

你的结果

结果将显示在这里。

下方的详细帮助目前仅提供英文版。

关于此工具

Developers often receive data as a spreadsheet and need it as JSON for an API, a configuration file, a static website or a test fixture. This converter reads an .xlsx sheet in your browser and gives you either an array of objects, using the first row as property names, or a plain array of rows.

Numbers stay numbers, empty cells become empty strings, rows that are completely empty are skipped, and date-formatted cells are written as readable dates.

使用方法

  1. Choose the .xlsx file and enter the sheet number.
  2. Choose “objects” to use the header row as keys, or “arrays” for raw rows.
  3. Run it and copy or download the JSON.

计算原理

The sheet is read from the workbook XML; with “objects” each subsequent row becomes {header: value}. Values keep their stored types and date-formatted numbers are converted to dates. Blank headers become column1, column2…; repeated headers get a _2, _3 suffix.

row n → { header₁: cell₁, header₂: cell₂, … }

计算示例

A web developer receives a sheet of 40 store locations with columns name, city, lat and lng. Converting with “objects” gives [{"name": "Downtown", "city": "Calgary", "lat": 51.045, "lng": -114.06}, …], ready to load into a map script.

示例输入和结果

选择文件并点击“运行”。转换后的文件会直接从浏览器下载。

局限性

  • One sheet at a time; .xls is not supported.
  • Merged cells and formatting are ignored.
  • Large sheets produce large JSON that may be slow to display.

最后更新:

常见问题

What if two headers are the same?

The second one gets a suffix, such as price_2, so no data is overwritten.

Are empty cells included?

Yes, as empty strings, so every object has the same keys; completely empty rows are skipped.

Can I get nested objects?

Not directly; use dotted headers and restructure in code, or use JSON to Excel for the reverse.

故障排除

Keys are column1, column2….

The first row must contain headers when using objects.

Dates look like numbers.

The cell may be formatted as a number in Excel; apply a date format and save.

Leading zeros were lost.

They were stored as numbers in Excel; format the column as text before saving.

隐私 & 免费使用

我的输入会被保存吗?

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

这个工具免费吗?

是的。无需注册或付费。

在浏览器中处理

推荐下一步