https://github.com/hramov/go-excel-parser
Web server that get Excel file and template JSON file to parse given Excel to JSON
https://github.com/hramov/go-excel-parser
excel golang parser webserver
Last synced: 12 months ago
JSON representation
Web server that get Excel file and template JSON file to parse given Excel to JSON
- Host: GitHub
- URL: https://github.com/hramov/go-excel-parser
- Owner: hramov
- Created: 2023-06-02T03:54:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-02T03:55:18.000Z (about 3 years ago)
- Last Synced: 2025-02-25T19:44:04.010Z (over 1 year ago)
- Topics: excel, golang, parser, webserver
- Language: Go
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Golang Excel Parser service
### Based on [excelize](http://github.com/xuri/excelize)
Description: web server that get Excel file and template JSON file to parse given Excel to JSON.
### It generates JSON representation of data in Excel file based on fields in template.
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:
1) PORT=3000 - server port;
2) UPLOAD_PATH=data/upload/ - directory for storing incoming Excel files.
### Request / Response example
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.