angular-saveas-xls-directive

AngularJS directive to download a table element as a xls file

Module License: MIT

Added by: Sam Deering

GitHub

Repository

numerique1/angular-saveas-xls-directive

Stats

Stars: 2

Watchers: 2

Forks: 0

Author

Numerique1
Numerique1

Module Description

angular-saveas-xls-directive

AngularJS directive to download a table element as a xls file using FileSaver.js

Actually work in progress

##TODO

Add option to customize css.

Installation

  1. Bower:
bower install angular-saveas-xls-directive
  1. Add to app dependencies:
var app = angular.module("app", ["angular-saveas-xls-directive"]);

How to use

<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 style classes

-'_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

Module stats last updated: 2015-06-07 05:42:51

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!