[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xlsread in Octave 3.6.4

From: Philip Nienhuis
Subject: Re: xlsread in Octave 3.6.4
Date: Sat, 02 Nov 2013 23:43:41 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100701 SeaMonkey/2.0.6

Markus wrote:
Am 2013-11-02 21:11, schrieb Philip Nienhuis:
Hi Markus,

Markus wrote:

I've pushed everything to my github repo[1] again (just the relevant
files for io).
hopefully i don't broke it now (That is quite possible) because i copy
and paste a lot.
Furthermore i've added some nice benchmarks at the end of the


[1] https://github.com/markuman/xlsxread
[2] https://github.com/markuman/xlsxread#benchmark

It seems you didn't fix the latest sources that I committed but rather
patched a local source?
But never mind, I again reformatted to Octave coding standards (wasn't
much work) and re-added the xls.limits assignment needed to avoid cell
errors in xls2oct.
I also had to (again) fix undefined references in __OCT_xlsx2oct__.m:
L. 117, 126: refs to "@__colnr", should be to "@__col_str_to_number" -
do you still have __colnr.m in your source tree?

uh, maybe you're right. i develope with single file xlsxread.m and i
guess i made often copy & paste errors.

As regards your remark "setup is a nightmare": All true.
But I made a function to make it easier for users, did you catch that?
(chk_spreadsheet_support.m); it checks all interfaces and adds all
required Java classes to the javaclasspath. All you have to do is
download them, put them together into one subdir and tell it to

yes, i did it with chk_spreadsheet_support. refering to

but xlsread failed as long as JExcelAPI .jar file was added to java
path. even when i force another interface.

Hey.... I thought I had fixed that bug a while ago... I'll check later.

Before hitting "Send": I'm really impressed. Your xlsxread stuff is
really blazingly fast. testOOXML sheet #2 takes 2.5 secs with OCT,
12.2 with POI, 34+ with UNO (LibreOffice 4.1.2) (all on WinXP)

and matlab run out of memory (on linux 8GB ram). this is the most
impressiv part for me.

On my Win7 64b 8 GB RAM box, Octave & COM (=Excel 2013) takes just 6,5 secs to read example.xlsx. I can't test xlsxread (I have no Octave-3.6.4 installed there yet); but UNO (LibreOffice 4.0) took a leisurely 780 secs (15 mins). (Java) POI bailed out (a bug in old io-1.2.2 I think).

next weeks i'll try implement to read just a range from xlsx files.

I figured that a temporary kludge could be to just read all data (xlsxread is fast enough), and then just select the requested rectangle from the full data matrix.

BYW I think reading strings would also be nice. I already had a brief look on how to do that (it is a 2 or 3-step procedure as the strings are kept in some other sheet). Vectorizing the procedure will be the real challenge.

The io package spreadsheet I/O stuff supports a SPSH_OPTS argument (actually a struct with fields that can be true (1) or false (0)). For strings we can add a new field "oct_get_strings" or so and in the _OCT_xlsx2oct__.m file we can have some if-endif's that test it and if "yes"/true also read the strings. That way we can keep the current speed if only numeric data are requested.

Tomorrow I'll (try to) make the 1.2.4 release.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]