C language method of processing CSV file (i)

Source: Internet
Author: User

What is a CSV file

CSV is the acronym for comma-separated values (comma separated values), which is usually separated by commas and not limited to commas, and we call him csv.

Look at the following example:

China, Shanghai, Pudong, Zhang San, 200000, 1234567

BMW; GER; 300000; RMB; i530

As can be seen from the above two examples, different separators can be used to separate the data, the data can be of different types, and the length is arbitrary.

A file consisting of multiple lines of CSV Records is called a CSV file (a comma-separated value file). Of course, they must use the same delimiter, the data corresponding to each column should have the same meaning, otherwise the file is meaningless.

CSV files can be opened directly from Excel in Microsoft Office and do not discuss actions under Windows.

C Language programming CSV file processing

Usually the CSV file contains a lot of useful information, and sometimes a large amount of data, a data file will reach the size of 1G, is usually a log and other important information.

There are many ways to deal with CSV files, and it is common to use the scripting languages of Bash, Python, and Perl to work with regular expressions. Here is a way to process a CSV file in the C language.

C language method of processing CSV file (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.