ExportToCSV

Export given array to csv file.

javascript · Common Scripts

Details

IDExportToCSV
Languagejavascript
From Version5.0.0
TagsUtility csv

README

Export given array to csv file

Script Data


Name Description
Script Type javascript
Tags Utility, csv

Inputs


Argument Name Description
fileName output filename
csvArray Array to export
headers Array to hold the file headers in order. Also excepts a comma separated list.
codec UTF-16-BOM to encode Non English characters. Default is: UTF-8

Outputs


There are no outputs for this script.

commonfields:
  id: ExportToCSV
  version: -1
name: ExportToCSV
script: ''
type: javascript
tags:
- Utility
- csv
comment: Export given array to csv file.
enabled: true
args:
- name: fileName
  required: true
  default: true
  description: output filename.
- name: csvArray
  required: true
  description: Array to export.
  isArray: true
- name: headers
  description: Array to hold the file headers in order.  Also excepts a comma separated list.
  isArray: true
- auto: PREDEFINED
  defaultValue: UTF-8
  description: 'UTF-16-BOM to encode Non English characters. Default is: UTF-8.'
  name: codec
  predefined:
  - UTF-8
  - UTF-16-BOM
scripttarget: 0
fromversion: 5.0.0
tests:
- exporttocsv_script_test