SimpleCSV - Simple CSV Java Package

This package provides classes that read/write files in CSV (Comma Separated Values) format.

Example Code

The following is a simple example program showing how SimpleCSV works. For a full working example see the BasicExample class.

CsvProcessor csvProcessor = new CsvProcessor(Account.class); File csvFile = new File("accounts.csv"); csvProcessor.writeAll(csvFile, accounts, true /* write header */); ... List readAccounts = csvProcessor.readAll(csvFile, true /* read in header */, true /* validate header */, null); ... public static class Account { @CsvField(columnName = "Name") private String name; @CsvField(columnName = "Account Number") private long number; // we use a format to show currency as $1,027.99 and ($23.15) @CsvField(columnName = "Amount", format = "$###,##0.00;($###,##0.00)") private double amount; ... }

Free Spam Protection   Eggnog Recipe   Android ORM   Simple Java Magic   JMX using HTTP   OAuth 2.0 Simple Example   Great Eggnog Recipe