javascript - Angularjs ng-csv export excel with multiple columns -
i'm trying export table excel file, i'm searching examples this:
html
<div ng-app="myapp"> <div ng-controller="myctrl"> <p>hello, {{name}}!</p> <button ng-csv="testdelim" csv-header="['field a', 'field b', 'field c']" csv-column-order="order" filename="custom.csv">download csv</button> </div>
js
angular .module('myapp',['ngsanitize', 'ngcsv']) .controller('myctrl', function($scope){ $scope.name = 'superhero'; $scope.order = [ 'b', 'a', 'c' ]; $scope.testdelim = [ {a:1, b:2, c:3}, {a:4, b:5, c:6} ]; });
but , examples make 1 column when export excel, this:
and want:
is form separate colums on excel? or other tool export .csv in angularjs.
Comments
Post a Comment