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. ...
随机推荐
- 单项选择RadioButton和多项选择CheckBox的使用
在Android中,可以通过RadioButton和RadioGroup的组合来实现单项选择的效果.而多项选择则是通过CheckBox来实现的. 1.单项选择RadioButton 我们知道,一 ...
- Go开发Struct转换成map两种方式比较
最近做Go开发的时候接触到了一个新的orm第三方框架gorose,在使用的过程中,发现没有类似beego进行直接对struct结构进行操作的方法,有部分API是通过map进行数据库相关操作,那么就需要 ...
- 本站上线KMS服务~一句命令激活windows和office
服务器地址:kms.luody.info 更新: 脚本维护更新:2016-09-29 服务端版本:vlmcsd-1108-2017-01-19-Hotbird64 服务作用:在线激活windows和o ...
- mysql-jdbc创建Statement与执行SQL
使用JDBC创建Connection后,执行SQL需要先创建Statement Statement stmt = connection.createStatement(); 创建代码如下 public ...
- request.getDispatcher().forward(request,response)和response.sendRedirect()的区别
在进行web开发时,跳转是最常见的,今天在这里来学习下2种跳转: 第一种是request.getDispatcher().forward(request,response): 1.属于转发,也是服务器 ...
- JS 隔行变色
<script type="text/javascript"> window.onload=function(){ var oUl= ...
- 【转】IUSR和IIS_IUSRS
转自:http://blog.chinaunix.net/uid-20344928-id-3306130.html 概述 在早期的IIS版本中,随着IIS的安装,系统会创建一个IUSR_Mac ...
- 【转载】Allegro Auto Rename器件反标注教程
Cadence设计时一般不主张在PCB文件中更改Logic(PADS的ECO更改),不过Auto Rename仍然是非常实用的功能,按照布局重排位号,可以让PCB的丝印标识更清晰,容易检查,位号易找, ...
- 1.2 java web的发展历史
前言 了解java web的发展历史和相关技术的演进历程,非常有助于加深对java web技术的理解和认识. 阅读目录 1.Servlet的出现 2.Jsp的出现 3.倡导了MVC思想的Servlet ...
- Maven依赖war开发,找不到war里头的class解决方案
问题描述: 开发一个web系统,需要引用另一个excel.war[在该系统里头是一个excel的导入导出小模块]进行项目 <dependency> <groupId>com.b ...




