2012年7月30日 星期一

CSV file define

The Wikipedia defines "CSV", comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form. Plain text means that the file is a sequence of characters, with no data that has to be interpreted instead, as binary numbers.
A user may need to transfer information from a database program that stores data in a proprietary format, to a spreadsheet that uses a completely different format. The database program most likely can export its data as "CSV"; the exported CSV file can then be imported by the spreadsheet program such as MS excel.


Usually the file has the characteristics:
1. Is Plain text (Sequence of characters)
2. One record per line and the end with CRLF for line breaks.
3. Each field is separated by omma, semicolon, or tab
4. Each record has the same fields.

For example:


name,age,render,height,weight
Alan,20,Male,180,89
Tom,30,Male,170,76


Refer to RFC 4180 for one definition that is commonly used

沒有留言:

張貼留言