Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
Update to 0.4.1.
  • Loading branch information
seanmars committed Sep 5, 2016
1 parent 05f24dd commit 9157c05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Export the data with JSON format from excel;

- [Features](#features)
- [How To Use](#howtouse)
- [Usage](#usage)
- [Todos](#todos)
- [Change logs](#logs)

Expand All @@ -13,27 +13,28 @@ Export the data with JSON format from excel;
- Export JSON with prettify or minify;
- Custom JSON template;

## <a name="howtouse"></a>How To Use
## <a name="usage"></a>Usage

### Excel
---
Tags:
Tag:

- \! => Ignore
- Column == A, it will ignore all the same column and row;
- Column != A, just ignore the same column;
- \# => Title
- The title of data in excel, it will transform to property's name of Object;
- ^ => Top-level attributes

### Example
---

- Use code:
```javascript
var e2jt = require('./index.js');
e2jt.loadTemplate('path/template.json', function(err, jsonObj) {
var data = e2jt.parse('path/excel.xlsx', 'sheet name', jsonObj);
e2jt.save('path/to/output/data.json', data);
e2jt.loadTemplate('./template/file/path/file.json', function (err, jsonObj) {
var data = e2jt.parse('./data/file/path/data.xlsx', 'sheet_name', jsonObj);
e2jt.save('path/to/output/output.json', data);
});
```

Expand All @@ -53,6 +54,16 @@ e2jt -h

## <a name="logs"></a>Change logs

### 2016/09/06
---
FIXED

- Now can use the recursively Object, Array in template file;

OTHER

- Add more test case;

### 2016/07/28
---
FEATURE
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "excel-to-json-template",
"version": "0.4.0",
"version": "0.4.1",
"description": "Translate excel to json with template.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9157c05

Please sign in to comment.