feat: add web UI with sidebar TOC and CLI args for json_to_excel
This commit is contained in:
+6
-2
@@ -93,7 +93,11 @@ def json_to_excel(json_file_path, output_excel_path=None):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
json_path = 'sample.json'
|
||||
out_path = '111.xlsx'
|
||||
import sys
|
||||
if len(sys.argv) < 2:
|
||||
print('Usage: python json_to_excel.py <input.json> [output.xlsx]')
|
||||
sys.exit(1)
|
||||
json_path = sys.argv[1]
|
||||
out_path = sys.argv[2] if len(sys.argv) > 2 else None
|
||||
result = json_to_excel(json_path, out_path)
|
||||
print(f"Excel saved to: {result}")
|
||||
|
||||
Reference in New Issue
Block a user