Python Forum

Full Version: how to use pyexcel to read ods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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))
When copy code web,mark all code and push 2-3 times on Remove Formatting button.
Or copy it out from a  text editor.
i have copied it from ide don't know what went wrong with formating :)
Dos it really read all into memory when using read partial data?
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 ?
please try pyexcel-odsr instead, which does read partial ods file.