I want to export the data of a dynamic paginated html table into an excel sheet using angular js. I have in google, but they all are working for static tables,not for the one I need. I have tried the below code:
var app = angular.module('myapp', []);
app.controller('Mycn',  function($scope) {
   $scope.exportfunc = function(){
   var strCopy = document.getElementById("MyTable").innerHTML;
   window.clipboardData.setData("Text", strCopy);
   var objExcel = new ActiveXObject ("Excel.Application");
   objExcel.visible = true;
   var objWorkbook = objExcel.Workbooks.Add;
   var objWorksheet = objWorkbook.Worksheets(1);
   objWorksheet.Paste;
   }
});
 
    