Jump to content
groovyPost Forums

Groovy Parse JSON file and out put file to xls

Recommended Posts


I have a code to start parsing Json file but don't know how to output it into an excel file? :cry: please help: here is my code:


import groovy.json.*

import groovy.json.JsonOutput


File f = new File("C:\\Users\\Pasi\\Documents\\"+File.separator+'json.txt')

def inputFile = new File("C:\\Users\\Pasi\\Documents\\json.txt")

def InputJSON = new JsonSlurper().parseText(inputFile.text)

InputJSON.each{ println it }





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who's Online   0 Members, 0 Anonymous, 44 Guests (See full list)

    • There are no registered users currently online
  • Create New...