I’ve been doing a couple of small Java programs at work. Mostly having to work with Comma Seperated Values (CSV) and such. One ushc program was trying to convert our contacts database, which at the monent is being kept as an outook file (I’m thinking about moving it to access), to a cvs which would be easy to import into horde webmail. The problem about the straigh forward approach is that when you export contacts from outlook, the corresponding csv has all the fields as columns, which is what you would think would happen. The thing is that Horde import wants one field for the name, not three or four. So I did what any other programmer would have, made a little program in a couple of hours to convert the outlook csv to something easily imported to Horde.
In another straight forward thinking approach, I decided to use
StringTokenizer. It made sense at the moment, as I didn’t realize that
StringTokenizer didn’t make tokens for “empty tokens”. I did find a some nice utility classes on google though. Theres even some javadoc! Using the
ExcelCSVParser I was quickly able to fix my headaches from StringTokenizer.
July 16, 2004 04:47 AM Programming