-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
Reading an xlsx file with empty cell results in a misaligned reading.
Expected Behaviour
Input
Expected
> pyexcel.get_sheet(file_name="messy2.xlsx")
Sheet1:
+-----+-----+-----+
| a | b | c |
+-----+-----+-----+
| 1.0 | 2.0 | |
+-----+-----+-----+
| | 2.0 | 3.0 |
+-----+-----+-----+
| 4.0 | 5.0 | |
+-----+-----+-----+
Actual Result
> pyexcel.get_sheet(file_name="messy2.xlsx")
Sheet1:
+-----+-----+---+
| a | b | c |
+-----+-----+---+
| 1.0 | 2.0 | |
+-----+-----+---+
| 2.0 | 3.0 | |
+-----+-----+---+
| 4.0 | 5.0 | |
+-----+-----+---+
Skimming the code it looks like pyexcel-xlsxr incorrectly assumes that data is already aligned.
FYI <sheetData/>
part of the sheet xml looks like follows:
<row r="1">
<c r="A1" s="1" t="s"><v>0</v></c>
<c r="B1" s="1" t="s"><v>1</v></c>
<c r="C1" s="1" t="s"><v>2</v></c>
</row>
<row r="2">
<c r="A2" s="1"><v>1.0</v></c>
<c r="B2" s="1"><v>2.0</v></c>
</row>
<row r="3">
<c r="B3" s="1"><v>2.0</v></c>
<c r="C3" s="2"><v>3.0</v></c>
</row>
<row r="4">
<c r="A4" s="1"><v>4.0</v></c>
<c r="B4" s="1"><v>5.0</v></c>
</row>
chfw and mtskelton
Metadata
Metadata
Assignees
Labels
No labels