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: Markus
Subject: Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4]
Date: Wed, 18 Sep 2013 23:12:40 +0200
User-agent: Roundcube Webmail/0.9.0

Am 2013-09-18 22:34, schrieb Philip Nienhuis:
It's fixed now. Can i push your attached files too?

You mean: to your repo?

Sure, that's fine with me.


Ok, I'll do it on friday.

As to your other reply: No, I'm not so interested in formula
evaluation support; that would get extremely complicated. I merely
wanted to draw attention to this (little) pitfall - I've encountered
it a few times myself. Matlab itself has the same problem on systems
w/o MS-Excel installed (Linux, Mac OSX, ....) but hasn't got it
documented.

Matlab mat file: http://p.osuv.de/index.php/PIO/
Octave mat file: http://p.osuv.de/index.php/aiS/

the last thing is that matlab ignored unused cells in the given
dimension around the values.
matlab size 8x1015
octave size 15x1024
next step is to get rid of them too.

And xlsxread can already handle folded cells.
Take a look at the 3 screenshots. It was just one more line to do this job.

Test1.xlsx http://p.osuv.de/index.php/RyD/
Octave http://p.osuv.de/index.php/rXK/
Matlab http://p.osuv.de/index.php/Zc3/
Excel Screenshot: http://p.osuv.de/index.php/hLtY/

Next Friday I'll have more time, now only a few minutes. Sorry for that.

If xlsxread.m works OK to your satisfaction, we'll have to think on:
- Do you want it to remain Matlab-compatible, or Octave style

It's already Matlab-incompatible ;)

- Do you want in the OF-io package
- If yes (I suppose so), well: how then?
* do we split it up cf. the other interfaces, or
* keep it in one file as just xlsxread
* do you want to add more options, like
> specifying a range to read

Range-read would be nice but it has the lowest priority for me.

What I'd like to do in the next 1-2 Weeks is:

1) get rid of the named NaN cols and rows who Matlab ignores too
2) implement Date and Time interpretation. (never take a look at it)
3) clean up the code
3.1) here and there little optimizations
3.2) split and merge everything for OF-io package.

> specifying sheets by name and/or by index number

This is implemented long time ago ;) You can do xlsxread('filename.xlsx','Stupid Map Name') or xlsxread('filename.xlsx',2) for example.

etc etc.

Splitting up would impose a little speed penalty, but add a lot of flexibility.
You could have a look on how things work for xlsread.m in the io
package and see if you like the philosophy there:

xlsread.m is a wrapper for xlsopen-xls2oct-[xls2oct-][...-]xlsclose
fuctions, to allow reading successive worksheets w/o repeated opening
& closing of a complete spreadsheet file (one of Matlab's more
braindead implementation details).

xlsopen.m is a wrapper for interface-specific functions in ./private/
Same for xls2oct.m and xlsclose.m. The interesting interface-specific
part is at the bottom of those files.

Interface-specific functions would be needed for:
1. Opening the spreadsheet file (unzipping it to a temp dir);
(This has already been done (for ODS) using your solution)

The question is, should we keep the unpack file from upstream octave 3.7.x as __unpack function to make it work in octave 3.6.x (most user are using this) too? For me this is the best solution and still don't hurt developement and usage in 3.7.x.

2. Detecting the occupied cell range in a worksheet;
3. Reading the data;

2 and 3 is one function (__readnr) in my xlsxread.

4. Closing the spreadsheet file;
(Extremely easy)

This is the first i do in __readnr :D

and when that's in place it's a small step to add a function to:
5. Get worksheet names & cell ranges for xlsfinfo.m support.
(Not so hard I think)


Yes, i guess too.

So for this sequence your xlsxread would merely have to be split into
steps 2 and 3, if at all possible.

Please think about it. I'll come back to it next Friday.

In the next week i'm more busy too because it's beginning of term.
So we'll see how fast xlsxread is going forward :)


cheers,
Markus

--
https://github.com/markuman
Jabber: address@hidden


reply via email to

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