How to add more than one header?
Opened this issue · 2 comments
mkarrfan commented
Please refer attachment.
dekhosla commented
Its easy
HTML
button type="button" ng-csv="exportArray()" filename="Reports_CSV.csv" csv-main="headerFirstExport" csv-header="headerExport">export</button
Javascript
$scope.exportArray = function () {
return $scope.data;
} $scope.headerFirstExport=['CSV-header 1 - Column A','CSV-header 1- Column B','CSV-header 1 - Column C'];
$scope.headerExport = ['CSV-header 2 - Column A','CSV-header 2 - Column B','CSV-header 2 - Column C'];
Library for ng-csv is attached below