octave-maintainers
[Top][All Lists]
Advanced

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

Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4]


From: Philip Nienhuis
Subject: Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4]
Date: Sat, 21 Sep 2013 17:20:40 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Markus wrote:
Am 2013-09-20 13:56, schrieb Philip Nienhuis:
:
<snip>
:
1) get rid of the named NaN cols and rows who Matlab ignores too

If there are extremely many of those, and reading them from XML takes
lots of time, sure, invest there.
Otherwise, have a look at xls2oct.m in the io package, it has a final
section for stripping enveloping empty rows and columns. It may do
just what you need.

I've got already an idea how to do that. It will simplify my __readnr
function too.


2) implement Date and Time interpretation. (never take a look at it)

At that point (date & time) the OF io package is not compatible with
Matlab. There are several reasons for that, but I won't digress into
those. Just note that severe headaches are looming.
Octave's xlsread returns numeric date "values" for dates later than 31
Dec 1899, and text strings for earlier dates; Matlab's xlsread usually
-not always- returns all dates as text strings. To convert numerical
Excel date values (in the 1/1/900 date system) to Octave datenums just
add 693960

"although I can imagine this to be a desirable option for many users
too." :P
But I will not say it too loud :D

Please don't :-) because IMO this is UNdesirable.
(..unless you want those severe headaches, of course ... :P )

IMO it is better to just let the user (who is supposed to know the data) sort it out.

ODS and some Java-based .xls class libs return less ambiguous date output, so there it is meaningful to return Octave datenums.

<snip>
:
By the way. I'll try a MXE build to test xlsxread in Windows. It said
that the unzip command was not found.
That's bit strange because the mxe build include system('awk')
successful for example.
Do you have any ideas what goes wrong?

Yes: unzip.exe is simply not included in (= built with) MXE. Same goes for a few other unpackers. I think it's not hard to add them to MXE, probably just use bzip2 or so as a template, but I had no time yet to look into it.
Maybe file a bug report for it.

In the mean time you can just download unzip.exe from the MinGW web site:
http://sourceforge.net/projects/mingw/files/MSYS/Extension/unzip/unzip-6.0-1/
(just take the binaries). Put them in the ./bin directory of where you installed MXE-Octave.

I do plan to make one more OF io package release (1.2.4) for Octave
3.6.x in the next weeks; I plan to include the Java-free odsread there
(almost ready), hopefully also your xlsxread.
For those two new features I'd need the patched unpack from 3.7.x as
well.

If you mean with "next weeks" at least two weeks, i guess yes.
Tomorrow I'll going to clone octave-io an start including it.

First have a look at what's already included in io. I've stripped quite a bit of duplicate code, no need to introduce new copies.

Anyway could you please wait until I can sent you an io-1.3.4-beta (f. Octave-3.7.6+), in which your unpack step has already been included (i.e., for odsread)? That'll save you (and me) a bit of work. ATM I have other 'distractions' - it might be after Wednesday anyway... so no hurry

Philip


reply via email to

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