How-to - handle enormous files in Libreoffice without running out of memory

7 respostas [Última entrada]
andyprough
Desconectado
Joined: 02/12/2015

I deal with very large spreadsheets at work, with over half million rows of data and hundreds of columns. Libreoffice can open them and manipulate them well, but when it periodically saves the "restore" data, it often crashes. There is a checkbox in the Libreoffice options to turn off autosave, but it doesn't stop it from regularly saving up this "restore" info. In order to use it for such a large file, I start it with the "--norestore" option:
localc --norestore ~/path-to-some-file.ods

That's it! With --norestore I can work on truly massive files all day long without the out-of-memory crashes. Just have to remember to save often, but manually saving does not cause the same memory problem as auto-saving the restore data.

andermetalsh
Desconectado
Joined: 01/04/2013

Check sc-im too, it imports XLSX files and ODS too.
It's supports gnuplot if you have it.

https://github.com/andmarti1424/sc-im

The guide for Ubuntu will work on Trisquel 10:

https://github.com/andmarti1424/sc-im/wiki/Ubuntu-with-XLSX-import-&-export

Visidata is cool too. You can get it through pip:

mkdir ~/src
cd ~/src
git clone https://github.com/saulpw/visidata/
virtualenv -p /usr/bin/python3 .
. bin/activate
pip3 install -r requeriments.txt
deactivate

a visidata.sh script:

#!/bin/sh
cd ~/src/visidata
. bin/activate
bin/visidata "$@"
deactivate

then just run visidata.sh $FILE.

Finally, on GUI's, GNUmeric may handle the big file fine.
As from v1.12, GNUmeric is not restricted to 65536 rows.

andyprough
Desconectado
Joined: 02/12/2015

>"Check sc-im"

I've tried sc-im, it does not handle massive spreadsheets. In fact, it still has the old 65,536 row limit. Too bad, I would love it if it were usable for that purpose.

I'll check Visadata, but I don't have high hopes that it would meet my needs based on their website.

GNUmeric in my personal experience is just awful for anything large. I'm not going down that road again.

Libreoffice is plenty good enough for my needs, no need to try to talk me into some other program.

lanun
Desconectado
Joined: 04/01/2021

> no need to try to talk me into some other program.

I like the determinate and resolute tone of that sentence. It reminds me of that fateful day when I said: "Hey, Cthulhu, no need to try to talk me into some other unearthly belief system".

I also always handle the LibreOffice saving and backing up myself, which makes the restore function mostly redundant. In fact, I have no recollection of even one case when the restoration data proved useful. It seemed always to be one version too early or too late to be of any help. In fact, I have become such a Ctrl+S maniac that I sometimes do it here while typing a post - at which point I get a prompt to save the current thread and wake up. That --norestore tip is going to feel good, thanks.

andyprough
Desconectado
Joined: 02/12/2015

>"I have become such a Ctrl+S maniac that I sometimes do it here while typing a post"

Medical science has proven that Ctrl+s maniacs like you and me live longer and have fuller hair, whiter teeth, and healthier sex lives.

lanun
Desconectado
Joined: 04/01/2021

True.

We hairy Ctrl+S maniac hutts have always been much more successful than our bare skin cousins in attracting healthy partners. We only have to keep an eye on the wookies, who are admittedly pretty good competitors for that matter.

andermetalsh
Desconectado
Joined: 01/04/2013

From the sc-im github repo:

>65.536 rows and 702 columns supported. (The number of rows can be expanded to 1.048.576 if wished).

And, for the Makefile hint:

# Maximum number of rows in spreadsheet. Up to 1048576
CFLAGS += -DMAXROWS=65536

andyprough
Desconectado
Joined: 02/12/2015

Ehh - maybe I'll give it a try. I have my doubts that it's really a full replacement. But it is true that I've always wanted to use it more. It's a fairly amazing little piece of software.