comp • gb.util • csvfile • fields

CsvFile.Fields (gb.util)

Property Fields As String[]

Return or set the list of fields as a string array.

When reading a CSV file, all field names are normalized by using the following algorithm:

  • The name is converted to lower case.

  • Newlines and tabs are replaced by spaces.

  • Unbreakable spaces (Unicode 160) are replaced by normal spaces.

  • If a space follows another space, it is removed.

  • If the name is void, it is replaced by a # character followed by the field index number.

When writing a CSV file, the specified field names are kept untouched.

If you are creating a new CSV file, you have to set the Fields property before writing anything.