I have a bad CSV file with rows of data that have varying numbers of elements in them. I want to read the values into arrays depending on the first value in a line. Here is an example:
"Joe", "Miller", "$545.67", "CA"
"", "00-6500", "$342.34"
"Mary", "Jones", "$778.67", "MA"
"$342.21", "$564.00", "$980.00", "432", "1995"
I'd like to be able to go through this file and only read the lines of data that start with nothing ("") or a number. I can do the testing to see if the values are what I'm looking for, my question is: how do I skip to the next line after I figure out that I don't want the data in the current line?
I'd the above data to be printed as (in excel with the spaces denoting cell seperation):
00-6500 $342.34
$342.21 $564.00 $980.00 432 1995
Thanks for your help!
Dave
"Joe", "Miller", "$545.67", "CA"
"", "00-6500", "$342.34"
"Mary", "Jones", "$778.67", "MA"
"$342.21", "$564.00", "$980.00", "432", "1995"
I'd like to be able to go through this file and only read the lines of data that start with nothing ("") or a number. I can do the testing to see if the values are what I'm looking for, my question is: how do I skip to the next line after I figure out that I don't want the data in the current line?
I'd the above data to be printed as (in excel with the spaces denoting cell seperation):
00-6500 $342.34
$342.21 $564.00 $980.00 432 1995
Thanks for your help!
Dave