Hi,
I have an delimited input file, which i read line by line to extract data.
the Input file looks something like this:-
Site Name,Room Number,Street Address,Town,City,State,,,,,,,,,,,,,,,,,,,,,,,
CVS Pharmacy,,500 Troy,Latham,NY,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,
,,,,,,,,,,,,,
,,,,,,,,,,,,,,,
The first line, is the header line.
But there are some comma delimiters for no reason
I need to process the data, ignoring any fields past what is expected.
How can I do that.
When i run the code, it gives me
Exception: Cannot access the Drive where the Input Files existsjava.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
I know why it is coming, because of the extra delimiters after each line and a line with just delimiters.
What java statement will help me skip lines where there is not data and also process lines only till the data present.
Thank You.