CSV Format
【CSV Format】
The comma separated values format (CSV) has been used for exchanging and converting data between various spreadsheet programs for quite some time. RFC documents the format of comma separated values (CSV) files and formally registers the "text/csv" MIME type for CSV in accordance with RFC 2048.
1. Each record is located on a separate line, delimited by a line break (CRLF). For example:

以CRLF来区别每一个record
2. The last record in the file may or may not have an ending line break. For example:

最后一条记录可以不加CRLF
3. There maybe an optional header line appearing as the first lineof the file with the same format as normal record lines. This header will contain names corresponding to the fields in the file and should contain the same number of fields as the records in the rest of the file (the presence or absence of the header line should be indicated via the optional "header" parameter of this MIME type). For example:
可以添加head,通过optional parameter的header flag来指示
4. Within the header and each record, there may be one or more fields, separated by commas. Each line should contain the same number of fields throughout the file. Spaces are considered part of a field and should not be ignored. The last field in the record must not be followed by a comma. For example:
用逗号分隔 5. Each field may or may not be enclosed in double quotes (however some programs, such as Microsoft Excel, do not use double quotes at all). If fields are not enclosed with double quotes, then double quotes may not appear inside the fields. For example:
可以有也可以没有双引号
6. Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes. For example:
如果有CRLF, 双引号,逗号,则这些符号必须放置在双引号中。
7. If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example:
使用双引号时,必须前置双引号以escape
参考:http://www.rfc-editor.org/rfc/rfc4180.txt
CSV Format的更多相关文章
- djangoadmin导出csv
from django.contrib import admin from .models import Order,OrderItem from django.http import HttpRes ...
- xls===>csv tables===via python ===> sqlite3.db
I've got some files which can help a little bit to figure out where people are from based on their I ...
- Python操作csv文件
1.什么是csv文件 The so-called CSV (Comma Separated Values) format is the most common import and export fo ...
- django后台admin csv 格式表格导出
1.在app下新建一个.py文件 此例commen.py commen.py (内容)(具体怎么导出的也不知道这么写就对了) import csv from django.http import H ...
- 导出CSV乱码
导出CSV,无论是什么格式,excel打卡都是乱码 需要加上 echo "\xEF\xBB\xBF"; header("Content-Disposition:attac ...
- python 读取mysql数据至csv文件中,并发送邮件
test 代码: #coding:utf-8 ''' Created on 2019年2月18日 @author: Administrator ''' import ConfigParser impo ...
- Jmeter-Maven-Plugin高级应用:Test Results File Format-Test Results
Test Results File Format Test Results Disabling The <testResultsTimestamp> Enabling <append ...
- HTML save data to CSV or excel
/********************************************************************************* * HTML save data ...
- Qt Read and Write Csv File
This page discusses various available options for working with csv documents in your Qt application. ...
随机推荐
- aac adts & LATM封装码流分析
本文继续上一篇文章的内容,介绍一个音频码流处理程序.音频码流在视频播放器中的位置如下所示. 本文中的程序是一个AAC码流解析程序.该程序可以从AAC码流中分析得到它的基本单元ADTS frame,并且 ...
- js 下获取子元素的方法
笔记核心: firstElementChild只会获取元素节点对象,从名称就可以看出来,firstChild则可以获取文本节点对象(当然也可以获取元素节点对象),比如空格和换行都被当做文本节点. js ...
- C++ Primer 第四版中文版
C++Primer是C++的经典教程. 开始时间:2014-08-10 完成时间:2014-08-28 学习成果:基础语法+
- IDEA导出想要的sql供H2数据库使用
通过Database连接远程oracle数据库. 选择对应的数据库 双击该数据库需要查询的表,进行自动查询,展示结果. 在查询结果中选择某条数据,右键,选择Data Executer,选择对应的方式. ...
- 【转载】Allegro Auto Rename器件反标注教程
Cadence设计时一般不主张在PCB文件中更改Logic(PADS的ECO更改),不过Auto Rename仍然是非常实用的功能,按照布局重排位号,可以让PCB的丝印标识更清晰,容易检查,位号易找, ...
- 内联元素inline-block空隙问题
1.产生的原因 当我们使用"display:inline-block"把块集元素转换为内联元素时,每两个内联元素之间有一定的空隙,既不是margin也不是padding,最终发现是 ...
- WM_COMMAND 和 WM_NOTIFY 的区别
当我们按下一个菜单选项,或者一个控件需要通知父窗口一个事件发生(如鼠标单击.双击等),或者快捷键被按下时,Windows将会发送一个 WM_COMMAND 消息给父窗口.那么 WM_COMMAND 消 ...
- Uploadify在asp.net下使用Demo
为了使自己以后不再去网上搜索,特记录下来 从uploadify官网http://www.uploadify.com/上下载文件 必要的文件: 1.jquery的js文件 2.jquery.upload ...
- 微信小程序之if操作
.wxss控制样式 .price-agent{ font-size: 25rpx; color:#ababab; float: left; position: absolute; bottom: 0; ...
- Centos 6.5 安装Oracle 11g R2 on vbox
由于上一篇的rac安装,截图较多,这一篇选择以txt的方式叙述,另外上一篇的时间比较久远,这里最近从新安装 --2018-10-29 1 os环境初始化 [root@rac1 yum.repos.d] ...




