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

Commit

Permalink
modified readme and package json
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohith committed Dec 28, 2018
1 parent 88d7a0b commit 8db254f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,24 @@ This library uses [guyonroche/exceljs](https://github.com/guyonroche/exceljs) un

# Installation

## Browser

Just add a script tag:

```html
<script type="text/javascript" src="../dist/tableToExcel.js"></script>
```

## Node

```bash
npm install @linways/table-to-excel --save
```

```javascript
import TableToExcel from "@linways/table-to-excel";
```

# Usage

Create your HTML table as normal.
Expand All @@ -38,13 +50,13 @@ TableToExcel.convert(document.getElementById("table1"), {

# Cell Types

Cell types can be set using the following data attributes:
Cell types can be set using the following data attributes:

|Attribute| Description| Possible Values|
|---------|------------|----------------|
|`data-t`| To specify the data type of a cell| `s` : String (Default)<br> `n` : Number <br> `b` : Boolean <br> `d` : Date|
|`data-hyperlink`| To add hyper link to cell | External URL or hyperlink to another sheet|
|`data-error`| To add value of a cell as error| |
| Attribute | Description | Possible Values |
| ---------------- | ---------------------------------- | -------------------------------------------------------------------------- |
| `data-t` | To specify the data type of a cell | `s` : String (Default)<br> `n` : Number <br> `b` : Boolean <br> `d` : Date |
| `data-hyperlink` | To add hyper link to cell | External URL or hyperlink to another sheet |
| `data-error` | To add value of a cell as error | |

Example:

Expand Down Expand Up @@ -140,6 +152,7 @@ Example:

[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

- Changed the backend to Exce[guyonroche/exceljs](https://github.com/guyonroche/exceljs)lJS
- Added border color
- Option to set style and color for all borders
- Exclude row
Expand Down
23 changes: 19 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
{
"name": "table-to-excel",
"version": "1.0.0",
"description": "",
"main": "index.js",
"name": "@linways/table-to-excel",
"version": "1.0.1",
"description": "Javascript library to create 'valid' excel file from html table with styles",
"main": "./dist/tableToExcel.js",
"repository": {
"type": "git",
"url": "https://github.com/linways/table-to-excel"
},
"bugs": {
"url": "https://github.com/linways/table-to-excel/issues"
},
"homepage": "https://github.com/linways/table-to-excel#readme",
"keywords": [
"html table to excel",
"excel with styles",
"excel js",
"table to excel",
"html to xlsx"
],
"scripts": {
"dev": "parcel sample/index.html",
"build": "parcel build src/tableToExcel.js",
Expand Down

0 comments on commit 8db254f

Please sign in to comment.