离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser
CSV 转 Excel(.csv → .xlsx)——长数字不被改坏,离线CSV to Excel offline — long numbers stay as written
CSV 进 Excel 的经典事故是这样的:一个 18 位身份证号变成 4.11111111111111E+17,"007" 变成 7,事后还没法还原——原值已经不在了。这里的判定条件写得比「看起来像不像数字」更严:字段解析成数字后再写回,必须与原文完全一致才当数字存。凡是回写不上的一致性子串——超长整数、前导零、科学计数写法——一律按文本存,原样保留。The classic CSV-into-Excel accident goes like this: an 18-digit ID becomes 4.11111111111111E+17, "007" becomes 7, and there is no way back, because the original value is gone. The test applied here is stricter than "does it look like a number": a field is stored as a number only if parsing it and re-printing it reproduce the original text exactly. Anything that fails that round trip — oversized integers, leading zeros, exponent spellings — is stored as text and kept verbatim.
这条链路怎么走How the route runs
CSVCSV Excel (.xlsx)Excel (.xlsx)
共 1 步,由扩展的路径搜索自动选出,中间产物不落盘。1 step, chosen by the extension's own path search; intermediate results never touch the disk.
会保留什么What carries over
- 只在「解析→回写完全一致」时判为数值单元格,因此长编号、前导零、多余的空白写法都不会被静默改写A cell becomes numeric only when parse-then-reprint reproduces the field exactly, so long IDs, leading zeros and unusual spellings are never silently rewritten
- Excel 只显示 15 位有效数字,这条规则由上面那个判定承担,而不是事后靠特例列表去补Excel renders 15 significant digits; that limit is absorbed by the round-trip test above rather than a list of special cases afterwards
- CSV 里以 = + @ 开头的字段被转义,落成 .xlsx 后不会被重新执行Fields beginning with = + @ are escaped, so the .xlsx cannot re-execute them
- 输入按 UTF-8 → GB18030 → GBK 依次尝试解码,国内 Excel 另存的 GBK CSV 直接可读Input is decoded UTF-8 → GB18030 → GBK, so a GBK CSV saved by a Chinese Excel reads correctly straight away
如实说明的限制What it does not do
- 一个 CSV 只有一张表;要多个工作表请把多份 CSV 一起放进批次,或转完在 Excel 里合并One CSV holds one grid; for several sheets batch several CSVs or merge them in Excel afterwards
- CSV 里没有的信息不会被凭空造出来:样式、列宽、公式、合并单元格、日期格式都不会出现Nothing is invented that CSV never carried: no styles, column widths, formulas, merged cells or date formats appear
- 看起来像日期的字符串(例如 1-2-3)不会被猜测成日期,会按原文保留A string that merely looks like a date (1-2-3, say) is not guessed as one — it stays as written
实操提示Working with it
- 一批最多 200 个文件,单个 100 MB 上限;结果文件名默认在源名后加日期与时间,模板可在偏好设置里改Up to 200 files per batch and 100 MB each; names default to the source name plus date and time, and the pattern is editable in preferences
- 需要「同一份数据既要 CSV 又要 Excel」时,可以在工作台里连续两步转,不必回到源文件When you need both CSV and Excel from the same data, chain the two conversions in the workbench instead of going back to the source
常见问题Questions people actually ask
为什么有些数字变成了文本?Why did some numbers become text?
这正是保护。回写不一致的数字一旦按数值存,Excel 显示会四舍五入或转科学计数,原值再也回不来。按文本存时你在 Excel 里看到的是写进去的那串字符本身。That is the protection working. A number that fails the round trip and is stored as a value will be rounded or shown in scientific notation by Excel, and the original is unrecoverable. As text, the cell shows exactly the characters you wrote.
我需要把它们变成数字怎么办?What if I do want them as numbers?
在 Excel 里对目标列做分列或值转换即可——本项目的默认是「值保真」,不替你猜意图。Use Excel’s own text-to-columns or value coercion on that column — the default here is value fidelity, which does not guess at your intent.
逗号分隔以外(分号、制表符)支持吗?Is anything other than comma supported (semicolon, tab)?
支持。分隔符是读的时候自动判断的,逗号、分号、制表符、竖线都能直接转,不用先另存一遍。判断结果不对时(比如正文里逗号特别多),在文件最前面加一行 sep=; 显式告诉它用哪个。Yes. The delimiter is sniffed while reading, so comma, semicolon, tab and pipe all convert as they are — no re-save first. When the guess is wrong (a body full of commas, say), put sep=; on the first line to say which one to use.
不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.
从 Chrome 应用商店安装Install from the Chrome Web Store 安装步骤Install steps GitHub 源码Source on GitHub