CSV
CSV Stream is a stream to process CSV data.
Stream property
| Property name |
Value |
| Line for beginning to read |
Specify the first line's number to process as record in data. For example, when data's first line is a heading with CSV format, if you specify 2, data will be output from the second line as stream skipping the first line. The initial value is 1. |
| Field number |
Specify a record's field number. Once it is specified, the fields will be prepared according to the number specified by field definition. The field name will be defined as "field+number", namely to add a number from 1 to "field". The initial value is 3. |
| Delimiter |
Specify a field's delimiter. The below delimiters can be defined. The initial value is ","(Comma).
| <tab> |
Tab[0x09] |
| , |
Comma |
| <space> |
Space[0x20] |
| ; |
Semicolon |
| <none> |
None. Take a line as a field. |
|
| Quote mark |
Specify a quote mark to enclose a stream's string field. You can specify the below marks to enclose. The initial value is """(double quote).
※When quote mark is not specified, the single-byte space or tab at the both ends of the string filed will be ignored.
※When you have specified the quote mark, and want to use the quote mark the same as the one in the the string field, you can escape it by using a \ mark and a mark like "\"", or doubling the mark like """"
※It's not necessary to use a mark to enclose each field when read stream from external.
| (none) |
No quote mark. |
| " |
Double quote |
| ' |
Single quote |
|
| Enclosed object |
Specify an object field when enclose a string field. The below objects can be specified.
| All |
The whole field is the enclosed object. |
| String Type only |
Only the String Type is the enclosed object. |
|
| Enclose empty data |
Specify the enclosing method when field value is empty.
| Yes |
Enclose empty data. |
| No |
Don't enclose empty data. |
|
| Escape for quote mark |
Specify the escape method when a quote mark appeared in a string.
| Backslash |
Escape by "\". |
| Doubling |
Escape by doubling the quote mark. |
|
| Delete the space |
Specify whether to delete the spaces in the front and end of the string or not when read the string which is not enclosed by quote mark.
When the string is enclosed by quote mark, the spaces can't be deleted whatever is specified here.
| Yes |
Delete the space in the front and end of the string when read. |
| No |
Don't delete the space in the front and end of the string when read. |
|
| Output encoding |
Specify a stream's encoding.
| utf-8 |
unicode utf-8 |
| shift_jis |
Shift JIS |
| euc-jp |
EUC-JP |
| iso-2022-jp |
ISO-2022-JP |
| utf-16 |
unicode utf-16 |
| Windows-31J |
Windows-31J |
|
| Linefeed Code |
Specify a linefeed code for seperating record.
※When read stream from external, it's not necessary to use the specified linefeed codes.
| Don't change |
Change into the platform standard linefeed code. |
| CR+LF |
Change into CR+LF. |
| CR |
Change into CR. |
| LF |
Change into LF. |
|
| Output the first line's field name |
Specify whether to output the field name to the output stream's first line or not.
| No |
Don't output the field definition's field name to the first line. |
| Yes |
Output the field definition's field name to the first line.
The field name isn't enclosed by quote mark.
|
| Yes(Enclose field name) |
Output the field definition's field name to the first line.
Enclose the field name when the quote mark is specified.
|
|
Field definition
Define field name and data type.
| Field name |
Specify field'd name. |
| Data type |
The arbitrary one of String, Boolean, Integer, Double, Decimal, DateTime. Binary can't be defined. |
Memo
- When read stream from external, if the field's number is smaller than the field definition's field number, null will be filled in, if the field name is bigger than the field definition's field number, ignore the field.
- When the String Type's field content is a string including linefeed, if the quote mark is "(none)", output the string rejected linefeed part.