I am developing an application where I need to export JSON Data to excel sheet. I searched in google . But I didn't get any good tutorial. can you suggest me any tutorial. this is my exact requirement. But I need the same in Java
1 Answer
Questions on exporting JSON to CSV have been previously asked here and a response was provided here: Converting JSON to XLS/CSV in Java
However since you asked for a tutorial this page shows an example with a different approach.
Hope that helps
3 Comments
chitti
I am getting compliletime error at this line JSONArray docs = response.getJSONArray("infile"); asking me to create local variable.
pelumi
Since I can't see your full code, I'm not sure which local variable you're referring to but it seems like the variable 'response' is the problem... Where did you declare it?
Omutwar
Hi @pelumi, it seems as of 2023 December, above external link is not available anymore.
FileWriterto write your CSV.