xlrd error message
Question: I'm trying to use `xlrd` to manipulate an `.xls` file as follows:

    
    
    >>> import xlrd
    >>> workbook = xlrd.open_workbook('6h.xls')
    

And I get:

    
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    
      File "/home/wayne-szalinsky/virt_env/virt_env/virt2/local/lib/python2.7/site-packages/xlrd/__init__.py", line 435, in open_workbook
        ragged_rows=ragged_rows,
    
      File "/home/wayne-szalinsky/virt_env/virt_env/virt2/local/lib/python2.7/site-packages/xlrd/book.py", line 91, in open_workbook_xls
        biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
    
      File "/home/wayne-szalinsky/virt_env/virt_env/virt2/local/lib/python2.7/site-packages/xlrd/book.py", line 1230, in getbof
        bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
    
      File "/home/wayne-szalinsky/virt_env/virt_env/virt2/local/lib/python2.7/site-packages/xlrd/book.py", line 1224, in bof_error
        raise XLRDError('Unsupported format, or corrupt file: ' + msg)
    xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found '<?xml ve'
    


Answer: Your file is apparently an XML file with an incorrect filename extension of
`.xls`. If you wish to open it as an Excel file, it must first be saved as an
Excel file, not just named like one.

You might be able to open it in a text editor, observe how the XML document is
laid out, and write your code to parse the XML instead of using xlrd.

