Python Forum
how to use pyexcel to read ods - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: how to use pyexcel to read ods (/thread-481.html)



how to use pyexcel to read ods - verb - Oct-14-2016

Hello everyone

I have posted this on the previous forum but didn't resolve this issue. I  have big ods file ( HERE )

and i am trying to read only some parts of the file for example first row but whatever i tried pyexcel tries to load whole sheet in memory before it read anything from the file and this takes a lot of time. Here is my code if anyone has idea how to read single row please let me know

from pyexcel_ods import get_data


part_data=get_data("arhiv.ods",start_row=4,row_limits=1)
print(json.dumps(part_data))

here is the code :

from pyexcel_ods import get_data

part_data=get_data("arhiv.ods",start_row=4,row_limits=1)
print(json.dumps(part_data))



RE: how to use pyexcel to read ods - snippsat - Oct-14-2016

When copy code web,mark all code and push 2-3 times on Remove Formatting button.
Or copy it out from a  text editor.


RE: how to use pyexcel to read ods - verb - Oct-14-2016

i have copied it from ide don't know what went wrong with formating :)


RE: how to use pyexcel to read ods - snippsat - Oct-14-2016

Dos it really read all into memory when using read partial data?


RE: how to use pyexcel to read ods - verb - Oct-15-2016

for less then 30sec this code eated more then 4GB of ram :) do you have any proposals on how to read single row from this file ?


RE: how to use pyexcel to read ods - Larz60+ - Oct-15-2016

There's always pandas see https://realpython.com/blog/python/working-with-large-excel-files-in-pandas/


RE: how to use pyexcel to read ods - pystarter - Feb-02-2017

please try pyexcel-odsr instead, which does read partial ods file.