Added whitespace handling in cell

This fixes bug where pyexcel-ods cannot parse multiple whitespaces
(<text:s text:c="2"/> and such).
This commit is contained in:
Azamat H. Hackimov 2017-08-21 23:08:25 +05:00
parent a9a1154bcd
commit 28e801697f
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@
# Thanks to grt for the fixes
import math
from odf import teletype
from odf.table import TableRow, TableCell, Table
from odf.text import P
from odf.namespaces import OFFICENS
@ -87,7 +88,7 @@ class ODSSheet(SheetReader):
def __read_text_cell(self, cell):
text_content = []
paragraphs = cell.getElementsByType(P)
paragraphs = teletype.extractText(cell.getElementsByType(P))
# for each text node
for paragraph in paragraphs:
data = ''