[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: |
Wed, 18 Sep 2013 22:34:39 +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:
=============================================================
>> xlsfinfo ("Mergedranges.xlsx", "uno")
1: Sheet1 (Used range ~ J1:AMJ15)
ans = Microsoft Excel Spreadsheet
=============================================================
Hey.....?? ^^^^^^^^^^^^^^^^^^^ ??
It's fixed now. Can i push your attached files too?
You mean: to your repo?
Sure, that's fine with me.
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
- 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
> specifying sheets by name and/or by index number
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)
2. Detecting the occupied cell range in a worksheet;
3. Reading the data;
4. Closing the spreadsheet file;
(Extremely easy)
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)
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.
Thanks,
Philip
- Re: xlsread in Octave 3.6.4, Philip Nienhuis, 2013/09/03
- Re: xlsread in Octave 3.6.4, Markus Bergholz, 2013/09/03
- Re: xlsread in Octave 3.6.4, Philip Nienhuis, 2013/09/04
- Re: xlsread in Octave 3.6.4, Markus Bergholz, 2013/09/13
- Re: xlsread in Octave 3.6.4, Philip Nienhuis, 2013/09/13
- Re: xlsread in Octave 3.6.4, Markus Bergholz, 2013/09/13
- Message not available
- Re: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus Bergholz, 2013/09/17
- Re: Test files [WAS: Re: xlsread in Octave 3.6.4], Philip Nienhuis, 2013/09/17
- Re: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus Bergholz, 2013/09/17
- Message not available
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/18
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4],
Philip Nienhuis <=
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/18
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Philip Nienhuis, 2013/09/20
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/21
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Philip Nienhuis, 2013/09/21
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/22
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], PhilipNienhuis, 2013/09/22
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/22
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/22
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], Markus, 2013/09/29
- Re: Fwd: Test files [WAS: Re: xlsread in Octave 3.6.4], PhilipNienhuis, 2013/09/29