http://www.j-paine.org/compiling_spreadsheets_to_prolog.html http://www.j-paine.org/spreadsheet_structure_discovery.html http://www.j-paine.org/dobbs/structure_discovery.html http://logic.stanford.edu/~mkassoff/papers/introtologicalspreadsheets.pdf http://arxiv.org/pdf/0803.0163 http://www.j-paine.org/dobbs/life.html
Here is some other work on detecting labels and structure:
http://www.datadefractor.com/Portals/0/Documents/Structuring%20The%20Unstructured.pdf , "Structuring the Unstructured: How to Dimensionalize Semi-Structured Business Data".
http://arxiv.org/abs/0802.3924 , "A Toolkit for Scalable Spreadsheet Visualization", Markus Clermont.
http://web.engr.orst.edu/~erwig/papers/TypeInf_PPDP06.pdf , "Type Inference for Spreadsheets", Robin Abraham and Martin Erwig.
http://www.google.co.uk/url?sa=t&rct=j&q=labels+and+type+inference+in+spreadsheets&source=web&cd=3&ved=0CC0QFjAC&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.153.6517%26rep%3Drep1%26type%3Dpdf&ei=hDmMUKisOujE0QXv5IDwBg&usg=AFQjCNEY4wUmgx3xdnFvOjmnCO9GsD7Baw "Software Engineering for Spreadsheets", Martin Erwig.
By the way, I wonder whether these are any use to you on ecological models:
http://www.era.lib.ed.ac.uk/handle/1842/4679 , "The Use of Prolog for Improving the Rigour and Accessibility of Ecological Modelling", Alan Bundy, R. Muetzelfeldt, D. Robertson, M. Uschold.
http://www.research.ed.ac.uk/portal/files/412346/Eco_Logic_Logic_Based_Approaches_to_Ecological_Modelling.pdf , "Eco-Logic: Logic-Based Approaches to Ecological Modelling", D. Robertson, A. Bundy, R. Muetzelfeldt, M. Haggith, M. Uschold.
You might be interested in http://www.j-paine.org/excelsior_2004/intro.html . This is an early version of my structure-discovery program, to which I gave a Prolog-TLI-style interface with a command language that could pass spreadsheets around as values and operate on them.