🔁 CSV 列替换(整列改值 / 列内查找替换)Replace CSV Column Values
把 CSV/TSV 指定列(按列号或表头名)整列改成新值,或只在这些列里查找替换文字,其它列不受影响。支持自动行号、整格匹配和多列同时处理。Set whole CSV or TSV columns (picked by number or header name) to a new value, or find and replace text only inside those columns, leaving the others alone. Supports row numbers, whole-cell matching and several columns at once.
使用说明与常见问题How-to & FAQ
「CSV 列替换(整列改值 / 列内查找替换)」是什么?What is the Replace CSV Column Values tool?
把 CSV/TSV 指定列(按列号或表头名)整列改成新值,或只在这些列里查找替换文字,其它列不受影响。支持自动行号、整格匹配和多列同时处理。Set whole CSV or TSV columns (picked by number or header name) to a new value, or find and replace text only inside those columns, leaving the others alone. Supports row numbers, whole-cell matching and several columns at once.
如何使用「CSV 列替换(整列改值 / 列内查找替换)」?How do I use the Replace CSV Column Values tool?
在「CSV 列替换(整列改值 / 列内查找替换)」中,把内容粘贴或输入到上方输入框,按需设置「列(列号或表头名)」、「查找内容」、「替换为({n} = 行号)」,结果会实时显示在下方,点击「复制结果」即可复制。In the Replace CSV Column Values: Paste or type into the input box, adjust "Columns (number or header name)", "Find", "Replace with ({n} = row number)"; the result appears below instantly — click "Copy result" to copy it.
怎么指定要替换的列?How do I choose the columns?
填列号(最左边是 1)或表头里的列名,多个用逗号分隔,比如 2,4 或 city,zip。表头名先精确匹配,找不到再忽略大小写和首尾空格匹配。不勾选“第一行是表头”时只能用列号,第一行也会被替换。Give column numbers (the leftmost is 1) or header names, separated by commas: 2,4 or city,zip. Header names match exactly first, then ignoring case and surrounding spaces. With 'First row is a header' off, only numbers work and the first row is changed too.
“整列改成新值”和“查找替换”有什么区别?What's the difference between the two modes?
“整列改成新值”把选中列的每个数据单元格都改成同一个值(可用 {n} 行号);“列内查找替换”只替换单元格里出现的查找文字,默认是部分匹配,勾选“整格完全相同”后只替换内容完全等于查找文字的单元格(适合把 N/A 清空)。查找区分大小写。'Set the whole column' writes the same value ({n} allowed) into every data cell of the chosen columns. 'Find and replace' only changes the matching text inside cells — partial matches by default; with 'Whole cell matches only' just the cells whose whole content equals the search text (handy for blanking N/A). Matching is case-sensitive.
TSV 也能用吗?Does it work with TSV?
可以。分隔符会自动识别(逗号、制表符、分号、竖线),输出保持原来的分隔符;也可以手动指定。Yes. The delimiter (comma, tab, semicolon or pipe) is detected and kept in the output, or you can pick it by hand.
代码或数据会被上传吗?Is my code or data uploaded?
不会。「CSV 列替换(整列改值 / 列内查找替换)」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Replace CSV Column Values runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「CSV 列替换(整列改值 / 列内查找替换)」免费吗?需要注册吗?Is the Replace CSV Column Values free? Do I need an account?
「CSV 列替换(整列改值 / 列内查找替换)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Replace CSV Column Values is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.