in reply to More efficient way to exclude footers
If there is a pattern in the text that identified a line as a header or footer then you should be able to ignore them as you parse the file.