Skip to content

Numerique1/angular-saveas-xls-directive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

AngularJS directive to download a table element as a xls file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published