Based on excelize
Description: web server that get Excel file and template JSON file to parse given Excel to JSON.
Template example
{
"id": 1,
"title": "Test",
"sheet_name": "Sheet1",
"sheet_number": 1,
"header_row": 1,
"start_row": 2,
"fields": [
{
"id": 1,
"name": "id",
"field": "userId",
"type": "string"
},
{
"id": 2,
"name": "title",
"field": "ProductTitle",
"type": "string"
}
]
}
There are two environment variable:
PORT=3000
- server port;UPLOAD_PATH=data/upload/
- directory for storing incoming Excel files.
From this Excel data
To this response
It matches fields by its name and thus there is no need to place columns in particular order.
Columns not described in template would be ignored.