Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSV File Manipulation

 
Azeem Mohammed
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 ?

Thanks,
Azeem
 
prem pillai
Ranch Hand
Posts: 87
Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The http://www.coderanch.com/how-to/java/AccessingFileFormats 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic