AndyC1000
asked on
Reading file skip header
Dear all,
I want to skip the first line (header) when reading a file. I've placed checks in previous code, if value of the cell matches the string ignore, however in this case there are too many columns.
See below code block.
Thanks
I want to skip the first line (header) when reading a file. I've placed checks in previous code, if value of the cell matches the string ignore, however in this case there are too many columns.
See below code block.
Thanks
File f = new File(filename);
Scanner sc = new Scanner(f);
while (sc.hasNextLine()) {
String line = sc.nextLine();
String[] details = line.split(",");
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.