Created
August 29, 2011 09:50
-
-
Save jacbar/1178109 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import com.csvreader.CsvReader; | |
public class mBankParser { | |
public static void main(String [] args){ | |
try { | |
CsvReader products = new CsvReader("products.csv"); | |
products.setDelimiter(';'); | |
products.setSkipEmptyRecords(true); | |
products.readHeaders(); | |
while(!products.getHeader(0).equals("#Data operacji")){ | |
products.readHeaders(); | |
} | |
while (products.readRecord()) | |
{ | |
for(String e : products.getHeaders()) | |
System.out.print(products.get(e)+ " "); | |
System.out.println(""); | |
} | |
products.close(); | |
} catch (FileNotFoundException e) { | |
e.printStackTrace(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment