Skip to content

Instantly share code, notes, and snippets.

@yne
Created February 12, 2023 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yne/22ad8abdb03df2f37def499f4622c2e0 to your computer and use it in GitHub Desktop.
Save yne/22ad8abdb03df2f37def499f4622c2e0 to your computer and use it in GitHub Desktop.
excel sheet to json
python -c 'import openpyxl,sys,json; json.dump([[cell.value for cell in row] for row in openpyxl.load_workbook(sys.stdin.buffer).worksheets[int(sys.argv[1])].iter_rows()], sys.stdout)' 3 < my.xlsm | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment