custom

Export To Csv

Shows how to expose the export to csv functionality with custom separator.

Default Separator


  • 1) Add `sep=,` to first line
  • 2) Change document separator to char `,`

exportToCsv('Filename-1', data);

Separator with Custom String


  • 1) Add `sep=;` to first line
  • 2) Change document separator to char `;`

exportToCsv('Filename-2', data, 'sep=;');

Separator with Custom String Char Only


  • 1) Add `sep=;` to first line
  • 2) Change document separator to char `;`

exportToCsv('Filename-3', data, ';');

Separator with Custom Object Type


  • 1) NOT add anything to first line
  • 2) Change document separator to char `;`

            var separator = { firstLine: false, char: ';' };
            exportToCsv('Filename-4', data, separator);