marcoconti83 / read-ods-with-odfpy Goto Github PK
View Code? Open in Web Editor NEWRead an ODS file with Python and Odfpy
License: Apache License 2.0
Read an ODS file with Python and Odfpy
License: Apache License 2.0
Can you change the code in a way to return a pandas dataframe instead?
Lines 71/72 currently read:
if (c.nodeType == 3):
textContent = u'{}{}'.format(textContent, n.data)
However, I think they should read:
if (c.nodeType == 3):
textContent = u'{}{}'.format(textContent, c.data)
Otherwise, ODSReader crashes immediately while trying to parse an ODS file with the Exception:
File "xxx/ODSReader.py", line 72, in readSheet
textContent = u'{}{}'.format(textContent, n.data)
The parser works with the fix suggested above.
In examples, code
from ODSReader import ODSReader
not work before renaming odf-to-array.py to ODSReader.py.
I think it is need to rename file in git repository or change examples.
I've been struggling with odfpy and every library that depends on it for a few hours.
line 35:
for sheet in self.doc.spreadsheet.getElementsByType(Table):
gives an error:
AttributeError: 'Text' object has no attribute 'getElementsByType'
remove 'spreadsheet' seems to fix the problem.
new line 35:
for sheet in self.doc.getElementsByType(Table):
I don't know if this is just fixing the symptom but has solved all my current problems.
Your example works great for reading text, but there seems to be no example for reading numbers. It would be nice if there was!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.