javascript - Angularjs ng-csv export excel with multiple columns -


i'm trying export table excel file, i'm searching examples this:

example ng-csv

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:

result

and want:

expected

is form separate colums on excel? or other tool export .csv in angularjs.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -