CONVERT JSON FILE TO EXCEL IN MATLAB

16 views (last 30 days)
rsi d
rsi d on 9 Nov 2016
Commented: Jeff Mackey on 13 May 2022
Hi, I have a big JSON file which I want to convert to a excel file so that I can use it for classiication and feature selection.
Any suggestions on steps to import the JSON file and convert it to an excel file with column names? THnaks a lot!
  2 Comments
KSSV
KSSV on 9 Nov 2016
But you have to attach one json file and tell how are expecting it in excel.
Jeff Mackey
Jeff Mackey on 13 May 2022
Jeff Mackey (2022). json2xls (https://www.mathworks.com/matlabcentral/fileexchange/111570-json2xls), MATLAB Central File Exchange. Retrieved May 13, 2022.

Sign in to comment.

Answers (1)

KSSV
KSSV on 9 Nov 2016
  1 Comment
Guillaume
Guillaume on 9 Nov 2016
In R2016b matlab has introduced a documented way of parsing json with jsondecode and in previous versions there was the undocumented matlab.internal.webservices.fromJSON which does the same, no need for an external library.
However, as you said in your comment to the question, we need to know the mapping between json and excel. There's nothing inherently tabular about json so it's not clear how to go from one to the other.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!