File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes CSV File Manipulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "CSV File Manipulation" Watch "CSV File Manipulation" New topic

CSV File Manipulation

Azeem Mohammed

Joined: Jan 15, 2009
Posts: 12

Can someone tell me how CSV files are manipulated in Java? And is there a way that new columns can be created in a CSV file with excel formulas using Java ?

prem pillai
Ranch Hand

Joined: Nov 02, 2007
Posts: 87

I think we are well aware that CSV file is a plain text file with comma separated values in it. So its just simple plain text; formatting facilities, formulas etc are not available. Spreadsheets like excel allows to view a CSV file in a tabular format. So what ever jazzy facilities you see in excel are not owned by CSV.

Now you know that CSV is a plain text , you know how to handle a plain text file with a comma delimited tokens (CSV file processing can be more complex depending on the type of data you have For example handling embedded commas , quotes etc makes it complex if your data demands for it).

Now if you dont want to create a CSV , but a spredsheet with jazzy features , then go for tools like Apache POI.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The page points to a number of libraries that can be used to manipulate CSV files, but I think they're mostly about reading and writing, not manipulating.
I agree. Here's the link:
subject: CSV File Manipulation
It's not a secret anymore!