The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "csv"
Line 26: | Line 26: | ||
Leading and trailing whitespace and embedded commas: | Leading and trailing whitespace and embedded commas: | ||
" AAA ", "B,B,B", " CCC,,," | " AAA ", "B,B,B", " CCC,,," | ||
+ | |||
+ | Use double-quotes if your data contains the quote (") character. So if your input data is | ||
+ | ''He said "Great"'' and ''"with quotes"'' and ''no quotes'' | ||
+ | you would use: | ||
+ | "He said ""Great!""", """with quotes""", "no quotes" | ||
+ | |||
''Note:'' In the USA and some other countries, for example the United Kingdom, Windows uses a dot (.) as decimal delimiter. For example, 0.5 = 1/2. In these countries, the data entries in a CSV file are separated by commas (,). | ''Note:'' In the USA and some other countries, for example the United Kingdom, Windows uses a dot (.) as decimal delimiter. For example, 0.5 = 1/2. In these countries, the data entries in a CSV file are separated by commas (,). |
Revision as of 19:29, 3 June 2008
The CSV ("Comma Separated Values") file format is often used to exchange data between differently similar applications. The CSV file format is useable by iMacros, Microsoft Excel and many other applications.
The CSV Format:
1. Each record is one line - Line separator may be LF (0x0A) or CRLF (0x0D0A), a line seperator may also be embedded in the data (making a record more than one line but still acceptable).
2. Fields are separated with commas.
3. Leading and trailing whitespace is ignored - Unless the field is delimited with double-quotes in that case the whitespace is preserved.
4. Embedded commas - Field must be delimited with double-quotes.
5. Embedded double-quotes - Embedded double-quote characters must be doubled, and the field must be delimited with double-quotes.
6. Embedded line-breaks - Fields must be surounded by double-quotes.
7. Always Delimiting - Fields may always be delimited with double quotes, the delimiters will be parsed and discarded by the reading applications.
Here are some examples that demonstrate the rules above. Each sample describes the data and how the reading application should interpret it.
Standard lines:
AAA, BBB, CCC 111, 222, 333 444, 555, 888
Leading and trailing whitespace and embedded commas:
" AAA ", "B,B,B", " CCC,,,"
Use double-quotes if your data contains the quote (") character. So if your input data is He said "Great" and "with quotes" and no quotes you would use:
"He said ""Great!""", """with quotes""", "no quotes"
Note: In the USA and some other countries, for example the United Kingdom, Windows uses a dot (.) as decimal delimiter. For example, 0.5 = 1/2. In these countries, the data entries in a CSV file are separated by commas (,).
In continental Europe and some countries elsewhere Windows uses a comma (,) as decimal delimiter. For example, 0,5 = 1/2. In these countries, the data entries in a CSV file are separated by semi-colons ( ; ).
You can switch between ; and , by going to Start > Control Panel > Regional and Language Options > Standards and formats drop down. You can change the country there. For ; as CSV separator select (for example) USA and for , as separator select (for Example) Germany.
For more information about the CSV data format please see [[1]]