csv文件格式
- 内码格式不限,可为ASCII、Unicode或者其他。
- 可含或不含列名,含列名则居文件第一行。
- 每条记录占一行,以逗号作为字段的分隔符。
- 每条记录都有同样的字段序列。
- 列为空也要用逗号表达其存在(两个逗号间无字符而已)
- 逗号前后的空格会被忽略
- 字段前后包含有空格,该字段必须用双引号括起来
- 字段中包含有逗号,该字段必须用双引号括起来
- 字段中包含有换行符,该字段必须用双引号括起来
- 字段中如果有双引号,该字段必须用双引号括起来
- 字段中的双引号用两个双引号表示
例子
1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""","",5000.00
1996,Jeep,Grand Cherokee,"MUST SELL! air, moon roof, loaded",4799.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""","",5000.00
1996,Jeep,Grand Cherokee,"MUST SELL! air, moon roof, loaded",4799.00