This commit is contained in:
43
readme.md
43
readme.md
@@ -31,12 +31,14 @@ functions:
|
||||
action:
|
||||
function: export-xlsx
|
||||
input:
|
||||
files:
|
||||
- name: input.json
|
||||
data: |
|
||||
jq(.input)
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
out-filename: example.xlsx
|
||||
sheets:
|
||||
- sheet:
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
input-file:
|
||||
- name: input.json
|
||||
data: |
|
||||
jq(.input)
|
||||
```
|
||||
#### Use jq to add a parent key 'input' containing array of objects
|
||||
```yaml
|
||||
@@ -45,12 +47,14 @@ functions:
|
||||
action:
|
||||
function: export-xlsx
|
||||
input:
|
||||
files:
|
||||
- name: input.json
|
||||
data: |
|
||||
jq(.array | {input: . } | tostring )
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
out-filename: example.xlsx
|
||||
sheets:
|
||||
- sheet:
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
input-file:
|
||||
- name: input.json
|
||||
data: |
|
||||
jq(.array | {input: . } | tostring )
|
||||
```
|
||||
|
||||
### Secrets
|
||||
@@ -115,9 +119,22 @@ functions:
|
||||
|
||||
| Name | Type | Go type | Required | Default | Description | Example |
|
||||
|------|------|---------|:--------:| ------- |-------------|---------|
|
||||
| files | [][DirektivFile](#direktiv-file)| `[]apps.DirektivFile` | | | File to create before running commands. | |
|
||||
| infile | string| `string` | | | Name of the json input file to utilise | |
|
||||
| out-filename | string| `string` | ✓ | `"output.xlsx"`| the filename of the output spreadsheet | |
|
||||
| worksheet-name | string| `string` | ✓ | `"Sheet1"`| Label for the worksheet created in the spreadsheet | |
|
||||
| sheets | [][PostParamsBodySheetsItems](#post-params-body-sheets-items)| `[]*PostParamsBodySheetsItems` | | | Array of worksheets to create in spreadsheet | |
|
||||
|
||||
|
||||
#### <span id="post-params-body-sheets-items"></span> postParamsBodySheetsItems
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**Properties**
|
||||
|
||||
| Name | Type | Go type | Required | Default | Description | Example |
|
||||
|------|------|---------|:--------:| ------- |-------------|---------|
|
||||
| infile | string| `string` | | | Name of the json input file to utilise | |
|
||||
| input-file | [][DirektivFile](#direktiv-file)| `[]apps.DirektivFile` | | | File to create before running commands | |
|
||||
| worksheet-name | string| `string` | | `"Sheet1"`| Label for the worksheet created in the spreadsheet | |
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user