It's not a secret anymore!
The moose likes Java in General and the fly likes Writing csv files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Writing csv files" Watch "Writing csv files" New topic

Writing csv files

Sunetra Sen
Ranch Hand

Joined: Feb 17, 2005
Posts: 43
I want to read data from the database and write it as a csv file which can then be downloaded by the user.
Is there any API available to write a csv file?

Please let me know.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

The Sun JDBC Driver database lists 13 drivers that threat CSVs as databases, so you can write from one to the other.
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
Check this out...

I have used custom database utility here, you can replace with yours or with JDBC code.

My blood is tested +ve for Java.
wood burning stoves
subject: Writing csv files
It's not a secret anymore!