I am trying to parse a CSV file, I have a program which will read in the contents of the file and display them to the console and i need to parse some of the fields, which I have no idea how to do I am trying to get the field info into to an SWT table. The csv file I'm trying to parse has some useless information before and after the file info which is numbered [0-n]. I need to get each relevent line and take its individual pieces of data and store them in an array or something so I can put them into my table i.e. '0:' in one tableItem and 'bla.jpg' in the next tableItem.
Any help or code samples would be much appreciated,
Thanks in advance,
--START OF CSV FILE-- File: penDriveImage3.001 Start: Wed Aug 02 19:49:44 2006 Length: 992 MB (1040187392 bytes)
Num Name (bs=512) Size File Offset Comment
0: 8426.jpg 5 KB 4314525 (null) /*THESE LINES ARE IN ONE FIELD EACH!?!* 1: 13578.jpg 42 KB 6952364 (null) 2: 13663.jpg 27 KB 6995952 (null) 3: 13791.jpg 26 KB 7061467 (null) 4: 14825.jpg 46 KB 7590486 (null) 5: 16830.jpg 83 KB 8617069 (null) 6: 16999.jpg 36 KB 8703995 (null) ...RANDOM DATA HERE... --END OF CSV FILE--
First, you don't have a CSV file. CSV stands for "Comma Seperated Value". Second, Fahd gave you a good answer in your previous post. What don't you understand about his post? Third, we like to keep things friendly around here so we insist that you use your real name (or at least a real-sounding name). You can change your displayed name here. [ August 11, 2006: Message edited by: Joe Ess ]
If your not going to be helpful then please don't reply to my post! AND the name I use is my nickname & isn't far off my real name with soc being my intitials so don't assume that its not friendly! I wouldn't have reposted if I still didn't have a problem. The external program I am using is outputting a csv file as above and that's what I have to work with, hence me having such a problem.
Hopefully this doesn't put off anyone else genuinely wanting to help me but I really am stuck.