From 5e555ad5ed406d8aaa357b09da654d02c4e2c750 Mon Sep 17 00:00:00 2001 From: Nicolas Palacio Date: Tue, 19 Nov 2024 14:27:43 +0100 Subject: [PATCH] Fixed xls processing of cell values --- pypath/inputs/common.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pypath/inputs/common.py b/pypath/inputs/common.py index 1170766d2..c4579e770 100644 --- a/pypath/inputs/common.py +++ b/pypath/inputs/common.py @@ -141,16 +141,7 @@ def read_xls( warnings.simplefilter('ignore') table = [ - [ - ( - cell - if isinstance(cell, str) else - cell.value - if cell is not None else - '' - ) - for cell in row - ] + [getattr(cell, 'value', cell or '') for cell in row] for row in (sheet[cell_range] if cell_range else sheet.values) ]