Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit 8db254f

Browse files
author
Rohith
committed
modified readme and package json
1 parent 88d7a0b commit 8db254f

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,24 @@ This library uses [guyonroche/exceljs](https://github.com/guyonroche/exceljs) un
88

99
# Installation
1010

11+
## Browser
12+
1113
Just 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

1931
Create 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

4961
Example:
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

package.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
{
2-
"name": "table-to-excel",
3-
"version": "1.0.0",
4-
"description": "",
5-
"main": "index.js",
2+
"name": "@linways/table-to-excel",
3+
"version": "1.0.1",
4+
"description": "Javascript library to create 'valid' excel file from html table with styles",
5+
"main": "./dist/tableToExcel.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/linways/table-to-excel"
9+
},
10+
"bugs": {
11+
"url": "https://github.com/linways/table-to-excel/issues"
12+
},
13+
"homepage": "https://github.com/linways/table-to-excel#readme",
14+
"keywords": [
15+
"html table to excel",
16+
"excel with styles",
17+
"excel js",
18+
"table to excel",
19+
"html to xlsx"
20+
],
621
"scripts": {
722
"dev": "parcel sample/index.html",
823
"build": "parcel build src/tableToExcel.js",

0 commit comments

Comments
 (0)