AngularJS directive to download a table element as a xls file using FileSaver.js
Actually work in progress
##TODO
Add option to customize css.
- Bower:
bower install angular-saveas-xls-directive
- Add to app dependencies:
var app = angular.module("app", ["angular-saveas-xls-directive"]);
<button saveas-xls save-as-charset="'utf-8'" save-as-name="'my-file-name'" target-element="'target-element'"></button>
<table id="target-element">
<tr>
<td class="xls-text_color _xls-color_#b52020">There is a red text</td>
<td class="_xls-bordered _xls-color__pink">There is a cell with pink border</td>
</tr>
</table>
-'_xls-bordered' : define a 1px solid black border on the element -'xls-text_color' : define text color -'xls-color#SOMEHEXACOLOR' : the color of your element will be #SOMEHEXACOLOR -'_xls-remove' : the element will not be on the xls file