Quantcast

Export plugin - export to a directory

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Export plugin - export to a directory

kavithasanthosh
Hi,

Can i export the csv file directly to a specified directory using export plugin..? how can i do tat?

Please help..

Thanks,
Kavitha.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Export plugin - export to a directory

Nathan Wells
You can do this with code that looks something like:

def exportService // << inject export service

def exportCsv() {
  File exportOutput = new File("/tmp/newTempFile.csv")
  def exportOutputStream = new FileOutputStream(exportOutput)
  exportService.export("csv", exportOutputStream, Author.getAll(), [:], [:] )
}

Hope this helps,
Nathan Wells


On Tue, Jul 24, 2012 at 11:53 AM, kavithasanthosh <[hidden email]> wrote:
Hi,

Can i export the csv file directly to a specified directory using export
plugin..? how can i do tat?

Please help..

Thanks,
Kavitha.



--
View this message in context: http://grails.1312388.n4.nabble.com/Export-plugin-export-to-a-directory-tp4632129.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...