mardi 10 mars 2015

Removing duplicates from csv and rearranging the data into columns with JAVA



I am looking for some help. I have an application at work that generates a csv with user information on it. I want to use JAVA and take the data, delete duplicate information, rearrange it, and create a spreadsheet, to make life easier. The csv is generated in the following format, but much larger:


21458952, a1234, Doe, John, technology, support staff, work phone, 555-555-5555


21458952, a1234, Doe, John, technology, support staff, work email, johndoe@whatever.net


21458952, a1234, Doe, John, technology, support staff, work pager, 555-555-5555


99946133, b9854, Paul, Jane, technology, administration, work phone, 444-444-4444


99946133, b9854, Paul, Jane, technology, administration, work email, janepaul@whatever.net


99946133, b9854, Paul, Jane, technology, administration, work pager, 444-444-4444


99946133, b9854, Paul, Jane, technology, administration, cell phone, 444-444-4444


I want to delete the duplicates and arrange the data in appropriate columns.


ID | PIN | Lname | Fname | Dept | team | work px | work email


I have been trying to build arrays with a BufferedReader to store the data, but I am running into difficulties dealing with duplicates and manipulating the data into a table. My Java skills are not very proficient (still working on that) and I need some direction on how this task can be done. Any help is greatly appreciated.


Thanks




Aucun commentaire:

Enregistrer un commentaire