Sort « CSV file « Java I/O Q&A





1. Sort one column of data in a csv file in ascending order in java    stackoverflow.com

import java.io.*;
import java.util.*;

public class Sort {

public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new FileReader("data1.csv"));        
Map<String, String> map=new TreeMap<String, String>();
String line="";
while((line=reader.readLine())!=null){ ...

2. Sorting a large CSV file    coderanch.com

hello all, just a quick one, this is my first post to the forum and i like what im seeing ;-) . Any way i have a bit of a problem. i have a 180Mb CSV file and i need to sort it in name and post code (ZIP) order. i have a small app to sort it and it works ...

3. sort a csv file having phone numbers    coderanch.com

4. sorting csv file for more than one column    forums.oracle.com

Hi, I want to sort a csv file by more than one column located in my local PC. Consider there are 5 columns in a csv file, such as Name,Vendor,Product,Host Name,Address,Sum. I want to sort the file with the column "Vendor,Product,Host Name" and store it in a another csv file. Minimum of 300+ of rows will be in the csv file. ...