返回顶部
C

CSV

Parse and generate RFC 4180 compliant CSV that works across tools.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
114
下载量
0
收藏
概述
安装方式
版本历史

CSV

## Quoting Rules - Fields containing comma, quote, or newline MUST be wrapped in double quotes - Double quotes inside quoted fields escape as `""` (two quotes), not backslash - Unquoted fields with leading/trailing spaces—some parsers trim, some don't; quote to preserve - Empty field `,,` vs empty string `,"",`—semantically different; be explicit ## Delimiters - CSV isn't always comma—detect `;` (European Excel), `\t` (TSV), `|` in legacy systems - Excel exports use system locale delimiter; semicolon common in non-US regions - Sniff delimiter from first line but verify—header might not contain special chars ## Encoding - UTF-8 BOM (`0xEF 0xBB 0xBF`) breaks naive parsers but Excel needs it for UTF-8 detection - When generating for Excel on Windows: add BOM; for programmatic use: omit BOM - Latin-1 vs UTF-8 ambiguity—explicitly declare or detect encoding before parsing ## Common Parsing Failures - Newlines inside quoted fields are valid—don't split on `\n` before parsing - Unescaped quote in middle of field corrupts rest of file—validate early - Trailing newline at EOF—some parsers create empty last row; strip or handle - Inconsistent column count per row—validate all rows match header count ## Numbers & Dates - `1,234.56` vs `1.234,56`—locale-dependent; standardize or document format - Dates: ISO 8601 (`2024-01-15`) only unambiguous format; `01/02/24` is chaos - Leading zeros in numeric fields (`007`)—quote to preserve or document as string ## Excel Quirks - Formula injection: fields starting with `=`, `+`, `-`, `@` execute as formulas—prefix with `'` or tab - Long numbers (>15 digits) lose precision—quote and format as text - Scientific notation triggered by `E` in numbers—quote if literal text needed

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 csv-parser-local-1776023187 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 csv-parser-local-1776023187 技能

通过命令行安装

skillhub install csv-parser-local-1776023187

下载 Zip 包

⬇ 下载 CSV v1.0.0

文件大小: 1.73 KB | 发布时间: 2026-4-13 09:56

v1.0.0 最新 2026-4-13 09:56
- Initial release of CSV skill for RFC 4180 compliant CSV parsing and generation.
- Handles cross-platform delimiter detection, including comma, semicolon, tab, and pipe.
- Supports robust quoting and escaping for special characters and Excel quirks.
- Manages encoding issues, including UTF-8 BOM handling for Excel compatibility.
- Includes guidelines for preventing common parsing failures and locale-induced data errors.
- Addresses Excel-specific pitfalls like formula injection and long number precision loss.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部