CSV FILE FORMAT

Mulesoft

CSV FORMAT

A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record.

Comma-separated values.

Filename extension.csv
Type of formatmulti-platform, serial data streams
Container fordatabase information organized as field separated lists
StandardRFC 4180

CSV Format Is Use

A CSV is a comma-separated values file, which allows data to be saved in a tabular format. CSVs look like a garden-variety spreadsheet but with a . csv extension. CSV files can be used with most any spreadsheet program, such as Microsoft Excel or Google Spreadsheets.

Here are the rules for creating CSV files:

  1. Separate data fields with a delimiter, usually a comma. This should be a single character. If you do not want to use a comma, you should choose something like a tab or a pipe (|) character.
  2. Keep each record on a separate line. Each record must start on its own line, but a single record can span multiple lines.
  3. Do not follow the last record in a file with a carriage return.
  4. In the first line of the file, include a header with a list of the column names in the file. This is optional, but strongly recommended; it allows the file to be self-documenting.
  5. Make sure the header list is delimited in the same way as the rest of the file. This helps guard against the data fields being transposed in the data when it is loaded, which can lead to getting wrong answers when you query the data.
  6. Remember that the enclosing character (typically double quotes) must be used when required, such as when the delimiter appears in a field.

For more detail on these rules, you can look at Wikipedia and RFC 4180 (the Request for Comments document in the CSV specification).

Difference Between CSV file and Excel?

Image result for csv format

CSV and Excel or xls are two different types of file extensions which both contain data in them, the difference between the both is that in CSV or comma-separated values the data is in text format separated by commas while in excel or Xls data is in tabular format or we say in rows and columns and in CSV file extension …

CSV file example

CSV is a delimited text file that uses a comma to separate values (many implementations of CSV import/export tools allow other separators to be used; for example, the use of a “Sep=^” row as the first row in the *.csv file will cause Excel to open the file expecting caret “^” to be the separator instead of comma “,”).

Follow Me

If you like my post please follow me to read my latest post on programming and technology.

Instagram

Facebook

Leave a Reply

Your email address will not be published. Required fields are marked *