nathan 18ec656103
Some checks reported errors
continuous-integration/drone/push Build was killed
Use improved json2excel
2024-06-28 09:21:48 +10:00
2023-11-21 15:31:31 +11:00
2023-02-10 15:20:32 +11:00
2024-06-28 09:21:48 +10:00
2023-02-10 14:56:47 +11:00
2023-11-21 14:37:06 +11:00
2023-02-10 15:15:53 +11:00
2023-02-10 14:56:47 +11:00
2023-11-21 15:31:31 +11:00

export-xlsx 1.0

Transform json input to xlsx spreadsheet



About export-xlsx

Transform json input to excel spreadsheet via json2excel command

Example(s)

Function Configuration

functions:
- id: export-xlsx
  image: registry.coadcorp.com/export-xlsx:1.0
  type: knative-workflow

Basic

- id: export-xlsx
  type: action
  action:
    function: export-xlsx
    input: 
      out-filename: example.xlsx
      sheets:
      - name: "TestSpreadsheet"
        input-file:
         - name: input.json
           data: |
             jq(.input)

Use jq to add a parent key 'input' containing array of objects

- id: export-xlsx
  type: action
  action:
    function: export-xlsx
    input: 
      out-filename: example.xlsx                   
      sheets:
      - name: "TestSpreadsheet"
        input-file:
        - name: input.json
          data: |
            jq(.array | {input: . } | tostring )                  

Secrets

  • export-xlsxSecret: This is a secret value

Request

Request Attributes

PostParamsBody

Response

List of executed commands.

Reponse Types

PostOKBody

Example Reponses

"{\"export-excel\": \"JVBERi0xLjUKJdDUxdgKNSAwIG9iago8PAov==\"}"

Errors

Type Description
io.direktiv.command.error Command execution failed
io.direktiv.output.error Template error for output generation of the service
io.direktiv.ri.error Can not create information object from request

Types

postOKBody

Properties

Name Type Go type Required Default Description Example
export-excel string string

postParamsBody

Properties

Name Type Go type Required Default Description Example
out-filename string string "output.xlsx" the filename of the output spreadsheet
sheets []PostParamsBodySheetsItems []*PostParamsBodySheetsItems Array of worksheets to create in spreadsheet

postParamsBodySheetsItems

Properties

Name Type Go type Required Default Description Example
infile string string Name of the json input file to utilise
input-file []DirektivFile []apps.DirektivFile File to create before running commands
name string string "Sheet1" Label for the worksheet created in the spreadsheet
Description
No description provided
Readme 227 KiB
Languages
Go 88.5%
Dockerfile 5.1%
Shell 3.4%
Gherkin 3%