Array to CSV record conversionπŸ”—

Converts elements of an input array to strings and joins them to a single string that can be written to a CSV file. The tool allows arbitary field separators and line endings, but not all of them result in CSV that can be parsed by other software. Be careful.


  • array: The fields to be converted to a CSV record.

  • separator: A separator string, placed between each field.

  • lineEnd: A string to be inserted at the end of the record.

  • quoteMode: The way fields will be quoted.


  • csvRecord: A formatted CSV record string.

enum QuoteModeπŸ”—

Quoting modes.


enumerator AutoQuoteπŸ”—

Add double quotes if a field contains double quotes or any of the characters in separator or lineEnd.

enumerator AlwaysQuoteπŸ”—

Don’t check if quotes are needed; always quote.

enumerator NeverQuoteπŸ”—

Don’t check if quotes are needed; never quote.