Nathan Coad c578081f64
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
update golang
2025-04-29 17:05:59 +10:00
2024-07-01 17:10:03 +10:00
2024-06-28 09:02:31 +10:00
2023-05-30 13:32:24 +10:00
2025-04-29 17:05:59 +10:00
2025-04-29 17:05:59 +10:00
2023-05-31 11:51:04 +10:00

json2excel

This is a basic utility to take json and convert it into an OpenXml format xlsx file, compatible with Excel.

It expects that the json input is formatted as an object containing an array of objects. Column names are generated based on the keys in the first nested object.

Command line options

Parameter Default Value Description
inputJson input.json File path of the input json to process
outputFilename output.xlsx File path of the output file
worksheetName Sheet1 Set the name of the worksheet, will be truncated to 31 characters
boldTopRow true Sets the top row of the worksheet to bold
freezeTopRow true Freezes the first row of the Excel worksheet
autofilter true Sets the auto filter on the first row
autowidth true Automatically set the column width to fit contents
overwriteFile false Overwrite any existing output file instead of modifying in-place

Advanced configuration

Advanced settings can be provided via a top level json key named "config". Here is a table of options that can be set via this config key.

Key Example Value Description
keyOrder "Column3,Column1,Column2" Comma separated list of column names in the desired order
overwriteFile true Boolean indicating whether output file should be overwritten if it already exists
parentNode "results" Specify an alternate starting key for the spreadsheet data than just the first non-config key. Useful with json structures with multiple top-level keys
Description
No description provided
Readme 7.8 MiB
2025-04-29 19:44:57 +10:00
Languages
Go 100%