functionbuilder again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-21 14:36:15 +11:00
parent 8a65fcf6ef
commit b50c6993ad
5 changed files with 25 additions and 29 deletions

View File

@@ -68,7 +68,7 @@ paths:
items:
type: object
properties:
worksheet-name:
name:
type: string
description: Label for the worksheet created in the spreadsheet
default: "Sheet1"
@@ -98,12 +98,11 @@ paths:
input:
out-filename: example.xlsx
sheets:
- sheet:
worksheet-name: "TestSpreadsheet"
input-file:
- name: input.json
data: |
jq(.input)
- name: "TestSpreadsheet"
input-file:
- name: input.json
data: |
jq(.input)
- title: Use jq to add a parent key 'input' containing array of objects
content: |-
- id: export-xlsx
@@ -113,8 +112,7 @@ paths:
input:
out-filename: example.xlsx
sheets:
- sheet:
worksheet-name: "TestSpreadsheet"
- name: "TestSpreadsheet"
input-file:
- name: input.json
data: |
@@ -127,7 +125,7 @@ paths:
- action: foreach
loop: .Sheets
#exec: /bin/json2excel -inputJson {{- if eq (deref .Infile) "" }} "input.json" {{- else }} {{ .Infile }} {{- end }} -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}'
exec: /bin/json2excel -inputJson {{- if eq (deref .Item.Infile) "" }} "input.json" {{- else }} {{ .Item.Infile }} {{- end }} -worksheetName "{{ .Item.WorksheetName }}" -outputFilename '{{ .OutFilename }}'
exec: /bin/json2excel -inputJson {{- if eq (deref .Item.Infile) "" }} "input.json" {{- else }} {{ .Item.Infile }} {{- end }} -worksheetName "{{ .Item.Name }}" -outputFilename '{{ .OutFilename }}'
silent: false
print: true
- action: exec