/** You may copy this example and use it for any purpose, commercial or otherwise. */ import com.ricebridge.csvman.CsvManager; import java.util.*; import java.io.*; /** Save some CSV data. */ public class Save { public static void main( String[] args ) throws Exception { // create some test data to save List data = new ArrayList(); data.add( new String[] {"Number", "Square"} ); for( int line = 1; line <= 10; line++ ) { String[] fields = new String[] { ""+line, ""+(line*line) }; data.add( fields ); } // save the data CsvManager csvman = new CsvManager(); csvman.save( "numbers.csv", data ); } }