{"action":"reopened","issue":{"url":"https://api.github.com/repos/python-excel/xlrd/issues/154","repository_url":"https://api.github.com/repos/python-excel/xlrd","labels_url":"https://api.github.com/repos/python-excel/xlrd/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/python-excel/xlrd/issues/154/comments","events_url":"https://api.github.com/repos/python-excel/xlrd/issues/154/events","html_url":"https://github.com/python-excel/xlrd/issues/154","id":111635380,"number":154,"title":"BUG:  XLS files saved by Excel 2013 on Windows cause AssertionError","user":{"login":"Dr-Irv","id":15113894,"avatar_url":"https://avatars.githubusercontent.com/u/15113894?v=3","gravatar_id":"","url":"https://api.github.com/users/Dr-Irv","html_url":"https://github.com/Dr-Irv","followers_url":"https://api.github.com/users/Dr-Irv/followers","following_url":"https://api.github.com/users/Dr-Irv/following{/other_user}","gists_url":"https://api.github.com/users/Dr-Irv/gists{/gist_id}","starred_url":"https://api.github.com/users/Dr-Irv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dr-Irv/subscriptions","organizations_url":"https://api.github.com/users/Dr-Irv/orgs","repos_url":"https://api.github.com/users/Dr-Irv/repos","events_url":"https://api.github.com/users/Dr-Irv/events{/privacy}","received_events_url":"https://api.github.com/users/Dr-Irv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-15T14:58:15Z","updated_at":"2016-06-06T13:33:35Z","closed_at":null,"body":"I was doing some testing of pandas and saved the same file as an XLSX and an XLS file for unit testing.  On Windows, I use Excel 2013. I need the XLS file to test Pandas.\r\n\r\nHere is the bug in xlrd 0.9.3 that I found.  I start with an XLSX file on Windows with Excel 2013.  That is attached as xlrdtest.xlsx.  That file reads fine with xlrd.\r\nI then use Excel 2013 to save the file as an XLS file (so that I can test it with pandas unit testing).  That file is attached as xlrdtest.xls .  That file fails to read in with xlrd:\r\n\r\n```\r\n>>> wk = xlrd.open_workbook(\"xlrdtest.xls\")\r\n*** formula/tFunc unknown FuncID:186\r\n*** formula/tFunc unknown FuncID:186\r\n*** formula/tFunc unknown FuncID:186\r\n*** formula/tFunc unknown FuncID:186\r\n*** formula/tFunc unknown FuncID:186\r\n*** formula/tFunc unknown FuncID:186\r\nTraceback (most recent call last):\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py\", line 3035, in run_code\r\n    exec(code_obj, self.user_global_ns, self.user_ns)\r\n  File \"<ipython-input-16-eb22c9b75a70>\", line 1, in <module>\r\n    wk = xlrd.open_workbook(\"xlrdtest.xls\")\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\xlrd\\__init__.py\", line 435, in open_workbook\r\n    ragged_rows=ragged_rows,\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\xlrd\\book.py\", line 116, in open_workbook_xls\r\n    bk.parse_globals()\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\xlrd\\book.py\", line 1198, in parse_globals\r\n    self.names_epilogue()\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\xlrd\\book.py\", line 997, in names_epilogue\r\n    evaluate_name_formula(self, nobj, namex, blah=blah)\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\xlrd\\formula.py\", line 1125, in evaluate_name_formula\r\n    assert len(tgtobj.stack) == 1\r\nAssertionError\r\n```\r\n\r\n\r\n\r\n\r\nI then transfer the XLSX file xlrdtest.xlsx to a Mac, and use Excel Mac 2011 to read in that file and save it as an XLS file.  That is attached as xlrdtestMac.xls.  That file reads in fine with xlrd.\r\n\r\nSo it seems the problem is with how the Windows version of Excel is saving the file.\r\n\r\nNote that it is the presence of multiple worksheets that seems to trigger the exception.  If the original XLSX file has one sheet, then the Excel 2013 saved XLS file reads in fine.\r\n\r\nThe test files to reproduce this can be found on Google Groups here:\r\nhttps://groups.google.com/forum/#!topic/python-excel/XeX07px4La0\r\n"}}
{"actor":{"display_login":"cjw296"}}