Search code examples
excelcsvdelimiterangular-ui-grid

Change angular ui-grid csvExporter separator


I have a UI-Grid and i need to export it to CSV. The problem is that the export has a comma (",") delimiter and for european versions of excel, I need a semicolon (";") delimiter. Is there any way i can set the csv delimiter in Ui-Grid, or to add an extra-line ("sep=;") to the csv file ?


Solution

  • Within your controller set the gridOptions exporterCsvColumnSeparator variable to ";".

    $scope.gridOptions.exporterCsvColumnSeparator = ';';
    

    See here at line ~210 for the relevant ui-grid/exporter.js code