I am trying to export data to excel in angular js
1) The user clicks the button 2) The data in $ scope.myArray is saved in the excel file.
I tried
var blob = new Blob($scope.myArray , {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
});
saveAs(blob, "Report.xls");
};
He suggests opening an excel file. But whenever I try to open it, it says that the file format or file extension is invalid.
Any help!
source
share