项目作者: lakshitha212

项目描述 :
Exporter
高级语言: JavaScript
项目地址: git://github.com/lakshitha212/Exporter.git
创建时间: 2016-06-05T06:27:37Z
项目社区:https://github.com/lakshitha212/Exporter

开源协议:

下载


Exporter

Exporter

Documentation

Run these commands to set up the Exporter:

  1. Clone the repo:
  2. git clone https://github.com/lakshitha212/Exporter
  3. Move into that directory:
  4. cd Exporter
  5. Install the dependencies:
  6. npm install
  7. Install the bower packages and dependencies:
  8. bower install
  9. Run the grunt process:
  10. grunt wiredep

How do I use it?

First include to page exporter.js file

  1. <!-- this should go after your </body> -->
  2. <script src="js/exporter.js"></script>

Example

HTML

  1. <div class="container">
  2. <div id="content_tbl">
  3. <div class="table-responsive">
  4. <table class="table table-bordered">
  5. <thead>
  6. <tr>
  7. <th>#</th>
  8. <th>Firstname</th>
  9. <th>Lastname</th>
  10. <th>City</th>
  11. <th>Country</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <tr>
  16. <td>1</td>
  17. <td>First Name 1</td>
  18. <td>Second Name 1</td>
  19. <td>City 1</td>
  20. <td>Country 1</td>
  21. </tr>
  22. <tr>
  23. <td>2</td>
  24. <td>First Name 2</td>
  25. <td>Second Name 2</td>
  26. <td>City 2</td>
  27. <td>Country 2</td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. </div>
  33. </div>

javaScript

  1. $('body').exporter({
  2. _id: "content_tbl",//container id
  3. _align: "text-right",//display
  4. _type: [1, 2],//1=> EXL , 2=> PDF
  5. _file: "Report"//File name xls
  6. });