文件格式任意转换助手Transfer Any File

离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser

JSON 转 Excel——经过 CSV 的两步链,嵌套值写进单元格JSON to Excel — two steps through CSV, values kept

注册表上没有 JSON 直连 Excel 这条路,走的是两步:JSON → CSV → Excel,由图上的路径搜索自动给出,中间结果只在内存里传递,不落盘也不联网。这条链路真正值得说的两件事都在数据形状上:一是表头不是照第一个对象的键抄,而是取所有对象键的并集——某行缺某个键就留空,不会丢行;二是嵌套对象与数组不会被摊平掉,它们以 JSON 文本写进单元格,信息完整但代价是「往返不对称」:从 Excel 再转回 JSON,得到的是那串文本。There is no direct JSON-to-Excel edge in the registry: the route is two steps, JSON → CSV → Excel, discovered by the path search over the converter graph, and the intermediate result lives only in memory — nothing is written to disk and nothing is fetched. The two things worth knowing are about shape. First, the header is not the first object’s keys but the union of every object’s keys — a row missing a key gets an empty cell rather than being dropped. Second, nested objects and arrays are not flattened away: they enter the cell as JSON text, which keeps the information intact at the cost of an asymmetric round trip — turn the sheet back into JSON and you get that text.

一批转换结果卡片,含文件名、体积与下载入口
一次混合批量,一个 ZIP 下载One mixed batch, one ZIP download

这条链路怎么走How the route runs

JSONJSON CSVCSV Excel (.xlsx)Excel (.xlsx)

共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.

会保留什么What carries over

  • 顶层是非空对象数组即可:表头取所有对象键的并集,某行缺某个键就留空而不是丢行A non-empty array of objects is enough: the header is the union of all keys, and a row missing one gets an empty cell instead of being dropped
  • 嵌套对象与数组以 JSON 文本写进单元格,不会被摊平掉或静默丢弃Nested objects and arrays enter the cell as JSON text rather than being flattened away or silently dropped
  • null 与 undefined 落成空单元格,而不是写出 "null" 文本null and undefined become empty cells, not the text "null"
  • 数字按数值写;以 = + - @ 或制表符开头的文本被转义,落到 .xlsx 仍是文本单元格并钉住文本格式,Excel 打开不会再执行它Numbers are written as numbers; text beginning with = + - @ or a tab is escaped, lands as a text cell and is pinned to text format, so Excel cannot re-execute it on open
  • 长编号与前导零这类「回写不一致」的值按文本存,不会变成科学计数Values that fail the round trip — long IDs, leading zeros — are stored as text and never collapse into scientific notation

如实说明的限制What it does not do

  • 顶层不是非空对象数组就报错:单独一个对象、或 [1, 2, 3] 这样的标量数组都不会被硬凑成一张表Anything that is not a non-empty array of objects raises an error: a single object, or a scalar array like [1, 2, 3], is not forced into a grid
  • 一个 JSON 文件只出一张工作表;要多个 sheet 请分别转再在 Excel 里合并One JSON file yields one worksheet; for several sheets convert separately and merge in Excel
  • 往返不对称:嵌套值以 JSON 文本进了单元格,从 Excel 转回去得到的是那串文本,不是原来的对象结构The round trip is asymmetric: nested values sat in the cell as JSON text, so reading the sheet back gives you that text, not the original structure
  • 表格之外的东西不会被造出来:样式、公式、多表结构、批注都不在输出里Nothing beyond the grid is invented: no styles, formulas, multiple sheets or comments appear

实操提示Working with it

  • 界面上的路径提示会画出这两步(JSON → CSV → Excel),两步都在本地完成,中间步骤不落盘、不联网The UI shows both hops (JSON → CSV → Excel); each runs locally, and the intermediate neither touches disk nor the network
  • 一批最多 200 个文件、单个 100 MB 上限;目标是 Excel 时不显示输出参数面板(那是为图片准备的)Up to 200 files per batch and 100 MB each; no output panel appears for an Excel target, because that panel belongs to images

常见问题Questions people actually ask

为什么提示我数据不是数组?Why does it say my data is not an array?

这条链路要的是「对象数组」。一个单独的对象请写成 [{...}];一个记录字典({"a": {...}, "b": {...}})先用文本编辑器改成数组再上传,或按记录拆成多个文件。The route wants an array of objects. Wrap a single object as [{...}]; for a dictionary of records either reshape it into an array in a text editor before uploading, or split it into one file per record.

嵌套字段能摊成多列吗?Can nested fields be spread across columns?

不能。摊平必须替每层键猜一个命名规则(user.address.city 还是 user_city?),而写进单元格的 JSON 文本不需要猜。需要摊平时,先在文本编辑器里把 JSON 改扁平再上传——工作台的编辑视图改的是转换结果,不是源文件。No. Flattening has to invent a naming rule for every level (user.address.city or user_city?), while JSON text in the cell invents nothing. If you need columns, flatten the JSON in a text editor before uploading — the workbench’s editing view changes the result, not the source file.

经过 CSV 那一步会不会生成中间文件?Does the CSV hop create an intermediate file?

不会。中间结果在内存里传给下一步,工作目录不会被写入任何东西,整条链路也没有网络调用。It does not. The intermediate passes to the next step in memory, nothing is written to your working directory, and the route makes no network call.

不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.