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的更多相关文章

  1. djangoadmin导出csv

    from django.contrib import admin from .models import Order,OrderItem from django.http import HttpRes ...

  2. 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 ...

  3. Python操作csv文件

    1.什么是csv文件 The so-called CSV (Comma Separated Values) format is the most common import and export fo ...

  4. django后台admin csv 格式表格导出

    1.在app下新建一个.py文件  此例commen.py commen.py (内容)(具体怎么导出的也不知道这么写就对了) import csv from django.http import H ...

  5. 导出CSV乱码

    导出CSV,无论是什么格式,excel打卡都是乱码 需要加上 echo "\xEF\xBB\xBF"; header("Content-Disposition:attac ...

  6. python 读取mysql数据至csv文件中,并发送邮件

    test 代码: #coding:utf-8 ''' Created on 2019年2月18日 @author: Administrator ''' import ConfigParser impo ...

  7. Jmeter-Maven-Plugin高级应用:Test Results File Format-Test Results

    Test Results File Format Test Results Disabling The <testResultsTimestamp> Enabling <append ...

  8. HTML save data to CSV or excel

    /********************************************************************************* * HTML save data ...

  9. Qt Read and Write Csv File

    This page discusses various available options for working with csv documents in your Qt application. ...

随机推荐

  1. Tinker爬坑之路

    目的 热修复去年年底出的时候,变成了今年最火的技术之一.依旧记得去年面试的时候统一的MVP,然而今年却变成了RN,热修复.这不得不导致我们需要随时掌握最新的技术.不然可能随时会被淘汰.记得刚进公司,技 ...

  2. 从无到有开发自己的Wordpress博客主题---代码环境准备

    注意这里说的是代码环境准备哦,而不是L(M)AMP运行环境哦,运行环境会在后述文章中在写. 一.在本地初始化git环境并且链接上gitee 1.在gitee上创建一个项目托管你的代码 这个不在赘述,按 ...

  3. MPLS基础一

    多协议标签交换(MPLS) 是一种用于快速数据包交换和路由的体系,具有管理各种不同形式通信流的机制. 内容:RID     /     MTU     /      认证    /     TTL   ...

  4. HTML5编写规范

    HTML和CSS编码规范内容 一.HTML规范 二.CSS规范 三.注意事项: 四.常用的命名规则 五.CSS样式表文件命名 六.文件命名规则 一.HTML规范: 1.代码规范 页面的第一行添加标准模 ...

  5. django初探-创建简单的博客系统(一)

    django第一步 1. django安装 pip install django print(django.get_version()) 查看django版本 2. 创建项目 打开cmd,进入指定目录 ...

  6. 核PCA投影平面公式推导

    样本方差推导 样本方差公式\[S = \frac{1}{n-1}\sum_{i=1}^n(x_i-\mu_i)^2\] 扩展开来得到\[S = \frac{1}{n-1}[(X-\frac{1}{n} ...

  7. kali视频(16-20)学习

    第五周 kali视频(16-20)学习 16.漏洞分析之数据库评估(一) 17.漏洞分析之数据库评估(二) 18.漏洞分析之WEB应用代理 19.漏洞分析之burpsuite 20.漏洞分析之fuzz ...

  8. setContentHuggingPriority和setContentCompressionResistancePriority的使用

    当两个UILabel并排显示时,如何设置约束,让 leftLB 和 rightLB 正常显示就很重要了. 方案1:左右两个Label的宽度相同,则约束设置如下: //添加标题约束,左边的label [ ...

  9. css关系选择符

    <!Doctype html> <html> <head> <meta http-equiv="Content-Type" content ...

  10. ④SpringBoot之thymeleaf使用

    本文介绍SpringBoot使用的模板技术thymeleaf以及通过webJar进行前端资源的引入以及使用thymeleaf介绍简单说, Thymeleaf 是一个跟 Velocity.FreeMar ...