@@ -8,12 +8,24 @@ This library uses [guyonroche/exceljs](https://github.com/guyonroche/exceljs) un
88
99# Installation
1010
11+ ## Browser
12+
1113Just add a script tag:
1214
1315``` html
1416<script type =" text/javascript" src =" ../dist/tableToExcel.js" ></script >
1517```
1618
19+ ## Node
20+
21+ ``` bash
22+ npm install @linways/table-to-excel --save
23+ ```
24+
25+ ``` javascript
26+ import TableToExcel from " @linways/table-to-excel" ;
27+ ```
28+
1729# Usage
1830
1931Create your HTML table as normal.
@@ -38,13 +50,13 @@ TableToExcel.convert(document.getElementById("table1"), {
3850
3951# Cell Types
4052
41- Cell types can be set using the following data attributes:
53+ Cell types can be set using the following data attributes:
4254
43- | Attribute| Description| Possible Values|
44- | ---------| ------------| ----------------|
45- | ` data-t ` | To specify the data type of a cell| ` s ` : String (Default)<br > ` n ` : Number <br > ` b ` : Boolean <br > ` d ` : Date|
46- | ` data-hyperlink ` | To add hyper link to cell | External URL or hyperlink to another sheet|
47- | ` data-error ` | To add value of a cell as error| |
55+ | Attribute | Description | Possible Values |
56+ | ---------------- | ---------------------------------- | -------------------------------------------------------------------------- |
57+ | ` data-t ` | To specify the data type of a cell | ` s ` : String (Default)<br > ` n ` : Number <br > ` b ` : Boolean <br > ` d ` : Date |
58+ | ` data-hyperlink ` | To add hyper link to cell | External URL or hyperlink to another sheet |
59+ | ` data-error ` | To add value of a cell as error | |
4860
4961Example:
5062
@@ -140,6 +152,7 @@ Example:
140152
141153[ Migration Guide] ( https://github.com/linways/table-to-excel/wiki/Migration-guide-for-V0.2.1-to-V1.0.0 ) for migrating from V0.2.1 to V1.0.0
142154
155+ - Changed the backend to Exce[ guyonroche/exceljs] ( https://github.com/guyonroche/exceljs ) lJS
143156- Added border color
144157- Option to set style and color for all borders
145158- Exclude row
0 commit comments