I want to convert spreadsheet data from Excel or Open Office saved as *.xls to *.json
There is no predefined method in Excel to convert the Excel data to JSON. You can either use online Excel to JSON conversion software or download an add-in from the Microsoft store for this task to get done.
JSON (Javascript Object Notation) is the most used data exchange format nowadays. Microsoft Excel doesn't have built-in support for importing JSON to excel or exporting excel data to JSON.
Assuming you really mean easiest and are not necessarily looking for a way to do this programmatically, you can do this:
Add, if not already there, a row of "column Musicians" to the spreadsheet. That is, if you have data in columns such as:
Rory Gallagher Guitar Gerry McAvoy Bass Rod de'Ath Drums Lou Martin Keyboards Donkey Kong Sioux Self-Appointed Semi-official Stomper
Note: you might want to add "Musician" and "Instrument" in row 0 (you might have to insert a row there)
Save the file as a CSV file.
Copy the contents of the CSV file to the clipboard
Go to http://www.convertcsv.com/csv-to-json.htm
Verify that the "First row is column names" checkbox is checked
Paste the CSV data into the content area
Mash the "Convert CSV to JSON" button
With the data shown above, you will now have:
[ { "MUSICIAN":"Rory Gallagher", "INSTRUMENT":"Guitar" }, { "MUSICIAN":"Gerry McAvoy", "INSTRUMENT":"Bass" }, { "MUSICIAN":"Rod D'Ath", "INSTRUMENT":"Drums" }, { "MUSICIAN":"Lou Martin", "INSTRUMENT":"Keyboards" } { "MUSICIAN":"Donkey Kong Sioux", "INSTRUMENT":"Self-Appointed Semi-Official Stomper" } ]
With this simple/minimalistic data, it's probably not required, but with large sets of data, it can save you time and headache in the proverbial long run by checking this data for aberrations and abnormalcy.
Go here: http://jsonlint.com/
Paste the JSON into the content area
Pres the "Validate" button.
If the JSON is good, you will see a "Valid JSON" remark in the Results section below; if not, it will tell you where the problem[s] lie so that you can fix it/them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With