After much OpenCV fiddling & tweaking, sorry… iteration, I’m pretty pleased with this. Columns and headers being detected accurately despite lots of variation in the images.

Tim Sherratt @wragge