Bottom Page

Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 how to use pyexcel to read ods
#1
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))
Quote
#2
When copy code web,mark all code and push 2-3 times on Remove Formatting button.
Or copy it out from a  text editor.
Quote
#3
i have copied it from ide don't know what went wrong with formating :)
Quote
#4
Dos it really read all into memory when using read partial data?
Quote
#5
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 ?
Quote
#6
There's always pandas see https://realpython.com/blog/python/worki...in-pandas/
Quote
#7
please try pyexcel-odsr instead, which does read partial ods file.
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)