List.CSVSplit
-------------

Splits CSV text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [7.4](newinversion74.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "List.CSVSplit"; Text { ; Delimiter } ) 

**MBS**( **"List.CSVSplit";** /\* Splits CSV text. \*/  
**$Text**; /\* The CSV text.e.g. "Hello;World" \*/   
**$Delimiter**) /\* Optional; The delimiter to use.  
If empty, we auto detect it.e.g. ";" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The CSV text. | "Hello;World" |  |
| Delimiter | The delimiter to use.   If empty, we auto detect it. | ";" | Optional      Added in version **8.5**. |

### Result

Returns list or error.

### Description

Splits CSV text.  
Plugin automatically detects if comma or semicolon is used.  
Returns list with all values.  
  
Version 8 can detect tab character, too.  
Please note that the parsing can handle multi line values, but that causes the list to have multiple entries for the value. Use [Matrix.CSVSplit](MatrixCSVSplit.md) or [QuickList.CSVSplit](QuickListCSVSplit.md) to handle that better as those can hold multi line values.  
### Examples

Split with one value:

 MBS ("List.CSVSplit"; "hello")  
Split with three values:

 MBS ("List.CSVSplit"; "\\"hello\\";\\"test\\";\\"CSV\\"")  
Split with 3 rows and 3 values:

 MBS ("List.CSVSplit"; "\\"hello1\\";\\"test\\";\\"CSV\\"¶\\"hello2\\";\\"test\\";\\"CSV\\"¶\\"hello3\\";\\"test\\";\\"CSV\\"")  
### See also

- [FM.InsertRecordCSV](FMInsertRecordCSV.md)
- [Matrix.CSV](MatrixCSV.md)
- [Matrix.CSVSplit](MatrixCSVSplit.md)
- [QuickList.CSVSplit](QuickListCSVSplit.md)
- [Text.ReadTextFile](TextReadTextFile.md)

### Release notes

- **Version 12.4**
    - Fixed a problem with [List.CSVSplit](https://www.mbsplugins.eu/ListCSVSplit.shtml), [Matrix.CSVSplit](https://www.mbsplugins.eu/MatrixCSVSplit.shtml) and [QuickList.CSVSplit](https://www.mbsplugins.eu/QuickListCSVSplit.shtml) not parsing properly quoted multi line value.
- **Version 12.2**
    - Optimized [List.CSVSplit](https://www.mbsplugins.eu/ListCSVSplit.shtml), [QuickList.CSVSplit](https://www.mbsplugins.eu/QuickListCSVSplit.shtml) and [Matrix.CSVSplit](https://www.mbsplugins.eu/MatrixCSVSplit.shtml) to better handle lonely quotes in quoted strings.
- **Version 9.0**
    - Fixed potential issue for [List.CSVSplit](http://www.mbsplugins.eu/ListCSVSplit.shtml) function.
- **Version 8.5**
    - Added delimiter parameter for [List.CSVSplit](http://www.mbsplugins.eu/ListCSVSplit.shtml), [QuickList.CSVSplit](http://www.mbsplugins.eu/QuickListCSVSplit.shtml) and [FM.InsertRecordCSV](http://www.mbsplugins.eu/FMInsertRecordCSV.shtml).
    - Improved handling of extra quotes in CSV text for [List.CSVSplit](http://www.mbsplugins.eu/ListCSVSplit.shtml) function.
    - Improved [List.CSVSplit](http://www.mbsplugins.eu/ListCSVSplit.shtml) to handle empty fields better and ignore = before quotes.
- **Version 8.0**
    - Improved CSV split ([List.CSVSplit](http://www.mbsplugins.eu/ListCSVSplit.shtml)) to handle multi line text values better.
- **Version 7.4**
    - Added CSV functions: [FM.InsertRecordCSV](http://www.mbsplugins.eu/FMInsertRecordCSV.shtml), [List.CSVSplit](http://www.mbsplugins.eu/ListCSVSplit.shtml) and [QuickList.CSVSplit](http://www.mbsplugins.eu/QuickListCSVSplit.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 12.4pr1](https://www.mbsplugins.de/archive/2022-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.2pr1](https://www.mbsplugins.de/archive/2022-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.6pr3](https://www.mbsplugins.de/archive/2018-12-12/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.5pr7](https://www.mbsplugins.de/archive/2018-11-14/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.5pr3](https://www.mbsplugins.de/archive/2018-10-24/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.0pr8](https://www.mbsplugins.de/archive/2018-01-15/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [Parsing VCard file](https://www.mbsplugins.de/archive/2017-11-13/Parsing_VCard_file/monkeybreadsoftware_blog_filemaker)
- [CSV functions in MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-11-01/CSV_functions_in_MBS_FileMaker/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.4pr8](https://www.mbsplugins.de/archive/2017-09-23/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 21st September 2017 , last changed 15th July 2022

  
[List.BestMatch](ListBestMatch.md) - [List.ColumnMatchesPostfix](ListColumnMatchesPostfix.md)

[HTML Version](ListCSVSplit.shtml)