On Tue, 14 Sep 2021, Sven Schreiber wrote:
Am 14.09.2021 um 19:08 schrieb Ignacio Diaz-Emparanza:
> I am seeing a problem when importing an xls file with qualitative
> variables. The problem is not present in importing xlsx or ods. Please
> try the attached file.
> (This is in Ubuntu Linux 20.04 with gretl built today. The xls file is
> created by Libreoffice)
Hi Ignacio, it would be helpful if you could state what your problem is,
but in this case I suppose that you mean the verbal/string-valued (and
discrete) series Puesto and Sexo are imported as all-zeros. I wouldn't
even be sure that that's supported, but since you say it works with xlsx
and ods, I guess it should be supported with xls as well.
However, I guess it should also be verified if that particular file
conforms to the xls standard, for example by opening it with Excel
(which I don't have on this machine right now).
The thing is that there's really no "xls standard". The nearest we
have to that is the OpenOffice document
Microsoft accept what they accept and reject what they reject, with
no explanation to anyone. There are several things about this
particular xls file that are misleading gretl; it would be tedious
to go into detail.
Ignacio, you say this file was created by LibreOffice, can you tell
us what version? I suspect a LibreOffice bug here.
Anyway, when in doubt, go for a properly documented spreadsheet
format, whether it be xlsx, ods, gnumeric or plain CSV. Gretl can (I
guess) read 95+ percent of xls files, but for the odd cases we can't
read as intended I'm afraid it would be a waste of our time to
struggle to get them right, in the dark without any published
For what it's worth, I created a spreadsheet in gnumeric with some
numeric columns and some string columns; saved it as xls; and opened
the xls file in gretl. The string columns came through just fine.