From 1779853b08dc48d2eccf9af623869363c03e74db Mon Sep 17 00:00:00 2001 From: Erwin Junge Date: Mon, 16 Feb 2015 12:18:19 +0100 Subject: [PATCH] Work around malformed inlineStr data --- xlsx/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xlsx/__init__.py b/xlsx/__init__.py index 90de316..132b569 100644 --- a/xlsx/__init__.py +++ b/xlsx/__init__.py @@ -182,7 +182,10 @@ def rowsIter(self): data = columnNode.find("{http://schemas.openxmlformats.org/spreadsheetml/2006/main}v").text elif columnNode.find("{http://schemas.openxmlformats.org/spreadsheetml/2006/main}is") is not None: if colType == "inlineStr": - data = columnNode[0][0].text + try: + data = columnNode[0][0].text + except IndexError: + data = '' if columnNode.find("{http://schemas.openxmlformats.org/spreadsheetml/2006/main}f") is not None: formula = columnNode.find("{http://schemas.openxmlformats.org/spreadsheetml/2006/main}f").text