{{announcement.body}}
{{announcement.title}}

Generating JSON Data From an Excel File

DZone 's Guide to

Generating JSON Data From an Excel File

In this brief article, see how to generate JSON from an Excel file with a Java tool.

· Database Zone ·
Free Resource

In the industry, there are many formats in which data can be stored. And each data format has its own limitation. In spite of there limitations, the JSON data format is very popular in the tech industry. Nowadays it is widely used everywhere. Microservices makes is very popular. But it comes with a very painful limitation. And the limitation is giving a comment. It is simply not possible to comment on a JSON file or data. And data without comment or documentation is very painful or dubious to understand or makes is difficult to make others understand. 

A developer or architect can understand the JSON data, but make it meaningful to management to understand is painful. In this situation, we need a tool that can mitigate this pain. Just like a situation, where a person has written the data required for the address of a person or locality in an excel file as the image attached below:

The above data are meaningful and easy to understand but needs to be converted into JSON format.

The JSON below is the generated one. Which we usually expected from the Excel file.

JSON
 




x


 
1
{
2
    "name": "",
3
    "house": "",
4
    "street_one": "",
5
    "street_two": "",
6
    "post_office": "",
7
    "district": "",
8
    "state": "",
9
    "country": "",
10
    "pincode": ""
11
}
12
 
          



Now, anybody can write or ask for clarification in the excel sheet, and still, they can generate the JSON data format with the help of the JSON data generating java tool called ExcelToJSON. The tool is available at Git repository Git Repo: Excel to JSON

Any improvements or suggestions are welcome.

Topics:
database, excel, java, json, json code, poi

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}