Sign in to follow this  
Pasi12

Groovy Parse JSON file and out put file to xls

Recommended Posts

HI

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 }

 

 

Thanks,

Pasi

Share this post


Link to post
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.

Guest
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.

Sign in to follow this  

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

    There are no registered users currently online