Skip to content

Commit fa49bca

Browse files
committed
update v2.0.0.0
1 parent 3d023c6 commit fa49bca

File tree

6 files changed

+83
-17
lines changed

6 files changed

+83
-17
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"marscode.chatLanguage": "cn"
3+
}

source/_static/sitemap.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = 'Excel-to-JSON'
1010
copyright = '2022~2025, WTSolutions'
1111
author = 'WTSolutions'
12-
release = '1.5.0.0'
12+
release = '2.0.0.0'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

source/getstarted.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@ Video Demonstration
3131
<iframe src="//player.bilibili.com/player.html?aid=558694077&bvid=BV14e4y1z7qd&cid=852578185&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
3232

3333
[Video Link](https://www.bilibili.com/video/BV14e4y1z7qd/)
34+
35+
## Dependencies
36+
* Bootstrap
37+
* Jquery
38+
* flat
39+
* sweetalert
40+
* jquery.json-viewer
41+
* clipboard
42+
* jsonlint

source/robots.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
User-agent: *
22
Allow: /
3-
43
Sitemap: https://excel-to-json.wtsolutions.cn/en/latest/sitemap.xml

source/usage.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Usage
22

3-
This documentation is written for Excel-to-JSON version 1.5.0.0
3+
This documentation is written for Excel-to-JSON version 2.0.0
44

55
Reading [Get Started](getstarted.md) section first is strongly recommended.
66

77
Line break in an Excel cell will be rendered as <br>
8+
89
<a name="Conversiontypes"></a>
910
## Conversion
1011

@@ -15,7 +16,17 @@ Reading [Get Started](getstarted.md) section first is strongly recommended.
1516
* The first row will be interpreted as header.
1617
* The following rows will be mapped with header as you can see in the following example.
1718

18-
**Example Excel sheet**
19+
## Conversion Mode
20+
* Flat JSON mode
21+
* Simply convert Excel datasheet to a flat JSON.
22+
* Nested JSON mode
23+
* First convert Excel datasheet to a flat JSON
24+
* then, unflatten an object with delimited keys using "Flat" [https://www.npmjs.com/package/flat](https://www.npmjs.com/package/flat)
25+
* unflatten() is called by Excel-to-JSON, with delimiter as ".", overwrite as true.
26+
27+
## Examples
28+
29+
**Example Excel sheet 1**
1930

2031

2132
|Name|Age|Company|
@@ -26,6 +37,7 @@ Reading [Get Started](getstarted.md) section first is strongly recommended.
2637
|Linda|30|Microsoft|
2738
|Joe|40|Github|
2839

40+
> Using Flat JSON mode
2941
3042
**Example JSON**
3143

@@ -59,6 +71,62 @@ Reading [Get Started](getstarted.md) section first is strongly recommended.
5971
]
6072
```
6173

74+
**Example Excel sheet 2**
75+
76+
|id|student.name|student.familyname|student.age|
77+
|---|---|---|---|
78+
|1|Meimei|Han|12|
79+
|2|Lily|Jaskson|15|
80+
|3|Elon|Mask|18|
81+
82+
> Using Flat JSON Mode
83+
84+
```json
85+
[{
86+
"id": 1,
87+
"student.name": "Meimei",
88+
"student.familyname": "Han",
89+
"student.age": 12
90+
}, {
91+
"id": 2,
92+
"student.name": "Lily",
93+
"student.familyname": "Jaskson",
94+
"student.age": 15
95+
}, {
96+
"id": 3,
97+
"student.name": "Elon",
98+
"student.familyname": "Mask",
99+
"student.age": 18
100+
}]
101+
```
102+
103+
> Using Nested JSON mode
104+
105+
```json
106+
[{
107+
"id": 1,
108+
"student": {
109+
"name": "Meimei",
110+
"familyname": "Han",
111+
"age": 12
112+
}
113+
}, {
114+
"id": 2,
115+
"student": {
116+
"name": "Lily",
117+
"familyname": "Jaskson",
118+
"age": 15
119+
}
120+
}, {
121+
"id": 3,
122+
"student": {
123+
"name": "Elon",
124+
"familyname": "Mask",
125+
"age": 18
126+
}
127+
}]
128+
129+
```
62130

63131

64132
<a name="jsonOutput"></a>

0 commit comments

Comments
 (0)