@@ -56,8 +56,8 @@ Can be converted to/from a spreadsheet like [examples/simple/main.csv](examples/
56
56
Using the commands:
57
57
58
58
```
59
- flatten-tool unflatten -f csv examples/simple --main-sheet-name main -- root-id='' -o examples/simple.json
60
- flatten-tool flatten -f csv examples/simple.json --main-sheet-name main --root-list-path main - o examples/simple
59
+ flatten-tool unflatten -f csv examples/simple --root-id='' -o examples/simple.json
60
+ flatten-tool flatten -f csv examples/simple.json -o examples/simple
61
61
```
62
62
63
63
@@ -123,8 +123,8 @@ These are also the spreadsheets that flatten-tool's `flatten` (JSON to Spreadshe
123
123
Commands used to generate this:
124
124
125
125
```
126
- flatten-tool unflatten -f csv examples/array_multisheet --main-sheet-name main -- root-id='' -o examples/array_multisheet.json
127
- flatten-tool flatten -f csv examples/array.json --main-sheet-name main --root-list-path main - o examples/array_multisheet
126
+ flatten-tool unflatten -f csv examples/array_multisheet --root-id='' -o examples/array_multisheet.json
127
+ flatten-tool flatten -f csv examples/array.json -o examples/array_multisheet
128
128
```
129
129
130
130
However, there are other "shapes" of spreadsheet that can produce the same JSON.
@@ -137,7 +137,7 @@ New columns for each item of the array:
137
137
| 7| 8| 9| 10| 11| 12|
138
138
139
139
```
140
- flatten-tool unflatten -f csv examples/array_pointer --main-sheet-name main -- root-id='' -o examples/array.json
140
+ flatten-tool unflatten -f csv examples/array_pointer --root-id='' -o examples/array.json
141
141
```
142
142
143
143
Repeated rows:
@@ -151,7 +151,7 @@ Repeated rows:
151
151
152
152
153
153
```
154
- flatten-tool unflatten -f csv examples/array_repeat_rows --main-sheet-name main -- root-id='' -o examples/array.json
154
+ flatten-tool unflatten -f csv examples/array_repeat_rows --root-id='' -o examples/array.json
155
155
```
156
156
157
157
@@ -367,20 +367,20 @@ And populate this with the package information for your release.
367
367
368
368
Then, for a populated xlsx template in (in release_populated.xlsx):
369
369
370
- flatten-tool unflatten release_populated.xlsx --base-json base.json --input-format xlsx --output-name release.json
370
+ flatten-tool unflatten release_populated.xlsx --base-json base.json --input-format xlsx --output-name release.json --root-list-path='releases'
371
371
372
372
Or for populated CSV files (in the release_populated directory):
373
373
374
- flatten-tool unflatten release_populated --base-json base.json --input-format csv --output-name release.json
374
+ flatten-tool unflatten release_populated --base-json base.json --input-format csv --output-name release.json --root-list-path='releases'
375
375
376
376
These produce a release.json file based on the data in the spreadsheets.
377
377
378
378
379
379
### Converting a JSON file to a spreadsheet
380
380
381
- flatten-tool flatten input.json --main-sheet-name releases --output-name unflattened
381
+ flatten-tool flatten input.json --main-sheet-name releases --output-name flattened --root-list-path='releases'
382
382
383
- This will create ` unflattened .xlsx` and a ` unflattened /` directory of csv files.
383
+ This will create ` flattened .xlsx` and a ` flattened /` directory of csv files.
384
384
385
385
## Usage for 360Giving
386
386
@@ -392,7 +392,7 @@ to the current directory.
392
392
393
393
flatten-tool create-template --root-id='' --output-format all --output-name 360giving-template --schema 360-giving-schema.json --main-sheet-name grants --rollup --use-titles
394
394
395
- flatten-tool unflatten --root-id='' -o out.json -f xlsx --main-sheet-name=grants input.xlsx --schema 360-giving-schema.json --convert-titles
395
+ flatten-tool unflatten --root-id='' -o out.json -f xlsx input.xlsx --schema 360-giving-schema.json --convert-titles --root-list-path='grants'
396
396
397
397
398
398
Running the tests
0 commit comments