• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSV File Manipulation

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 87
Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The https://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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic