"CSV" 是逗号分隔文件 (Comma Separated Values)的首字母英文缩写
1. 是一种用来存储数据的纯文本格式,通常用于电子表格或数据库软件。
2. 在 CSV 文件中,数据"栏"以逗号分隔,可允许程序通过读取文件为数据重新
1. 是一种用来存储数据的纯文本格式,通常用于电子表格或数据库软件。
2. 在 CSV 文件中,数据"栏"以逗号分隔,可允许程序通过读取文件为数据重新
<wbr></wbr>创建正确的栏结构,并在每次遇到逗号时开始新的一栏。
一般格式第一行写列名(不同栏目使用逗号分割);第二行开始往下记<wbr></wbr>录数据,每行数据使用引号括起来,列于列之间使用逗号隔开。
3. 举例CSV文件
sample.csv
日期,文件名,行数
"2007-10-24-10-02-50","ffsco.h","92"
"2007-10-24-10-02-50","StdAfx.h","19"
"2007-10-24-10-02-50"," resource.h","31"
"2007-10-24-10-02-50","StdAfx.h","27"
"2007-10-24-10-02-50","test2.h","49"
"2007-10-24-10-02-50","test2Dlg.h ","62"
CSV可以使用Excel等文件打开。
4. CSV文件的一些格式:
* 每条记录占一行
* 以逗号为分隔符
* 逗号前后的空格会被忽略
* 字段中包含有逗号,该字段必须用双引号括起来
* 字段中包含有换行符,该字段必须用双引号括起来
* 字段前后包含有空格,该字段必须用双引号括起来
* 字段中的双引号用两个双引号表示
* 字段中如果有双引号,该字段必须用双引号括起来
* 第一条记录,可以是字段名
5.
CSV通常被用来应用程序之间交换数据的格式,现在已经逐渐地被X<wbr></wbr>ML格式所取代,因此CSV可以说是遗留下来的一种数据格式<wbr></wbr>,取代它的XML格式具有更多的优点。
CSV Overview
The CSV ("Comma Separated Value") file format is often used to exchange data between disparate applications. The file format, as it is used in Microsoft Excel, has become a pseudo standard throughout the industry, even among non-Microsoft platforms.
As is the case with most exchange formats since XML, CSV files have become somewhat of a legacy format. New applications that wish to include an export format will generally use XML today (though there may be exceptions). In legacy systems though (pre-XML), CSV files had indeed become a de facto industry standard. Just as there are still billions of lines of CoBOL code in use today that need to be maintained, support for a legacy standard such as CSV is likely to be required long after it has stopped being implemented in new designs.
更多参考权威的:
http://www.creativyst.com/Doc<wbr></wbr>/Articles/CSV/CSV01.htm
一般格式第一行写列名(不同栏目使用逗号分割);第二行开始往下记<wbr></wbr>录数据,每行数据使用引号括起来,列于列之间使用逗号隔开。
3. 举例CSV文件
sample.csv
日期,文件名,行数
"2007-10-24-10-02-50","ffsco.h","92"
"2007-10-24-10-02-50","StdAfx.h","19"
"2007-10-24-10-02-50"," resource.h","31"
"2007-10-24-10-02-50","StdAfx.h","27"
"2007-10-24-10-02-50","test2.h","49"
"2007-10-24-10-02-50","test2Dlg.h ","62"
CSV可以使用Excel等文件打开。
4. CSV文件的一些格式:
* 每条记录占一行
* 以逗号为分隔符
* 逗号前后的空格会被忽略
* 字段中包含有逗号,该字段必须用双引号括起来
* 字段中包含有换行符,该字段必须用双引号括起来
* 字段前后包含有空格,该字段必须用双引号括起来
* 字段中的双引号用两个双引号表示
* 字段中如果有双引号,该字段必须用双引号括起来
* 第一条记录,可以是字段名
5.
CSV通常被用来应用程序之间交换数据的格式,现在已经逐渐地被X<wbr></wbr>ML格式所取代,因此CSV可以说是遗留下来的一种数据格式<wbr></wbr>,取代它的XML格式具有更多的优点。
CSV Overview
The CSV ("Comma Separated Value") file format is often used to exchange data between disparate applications. The file format, as it is used in Microsoft Excel, has become a pseudo standard throughout the industry, even among non-Microsoft platforms.
As is the case with most exchange formats since XML, CSV files have become somewhat of a legacy format. New applications that wish to include an export format will generally use XML today (though there may be exceptions). In legacy systems though (pre-XML), CSV files had indeed become a de facto industry standard. Just as there are still billions of lines of CoBOL code in use today that need to be maintained, support for a legacy standard such as CSV is likely to be required long after it has stopped being implemented in new designs.
更多参考权威的:
http://www.creativyst.com/Doc<wbr></wbr>/Articles/CSV/CSV01.htm