[Top][All Lists]

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

Re: Error reading .xlsx file using io

From: jmb
Subject: Re: Error reading .xlsx file using io
Date: Tue, 21 Oct 2014 13:53:24 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 10/21/2014 01:20 PM, Markus Bergholz wrote:

On Tue, Oct 21, 2014 at 3:09 PM, jmb <address@hidden> wrote:
I am trying to read an MS-Excel spreadsheet (which unfortunately is
proprietary info) that results in the following error message:

octave:1> pkg load io;
        octave:2> A = xlsread ("File1.xlsx", 'First_Table', 'A5:Y67');
        Detected XLS interfaces: error: cell2mat: C is not a cell array
        error: called from:
        error:   /opt/octave3.8/share/octave/3.8.1/m/general/cell2mat.m at line
36, column 5
        error:   /home/.../octave/io-2.2.4/private/__OCT_xlsx2oct__.m at line
237, column 14

There are already some changes at this point. Maybe it's already fixed. But it's hard to say without an example file.

        error:   /home/.../octave/io-2.2.4/xls2oct.m at line 210, column 27
        error:   /home/.../octave/io-2.2.4/xlsread.m at line 214, column 25

The "File1.xlsx" spreadsheet was created using MS-Excel 2010, by
somebody else.

The pertinent version info:

        octave:2> version
        ans = 3.8.1
        octave:3> pkg list
        Package Name    | Version | Installation directory
                   io *|   2.2.4 | /home/.../octave/io-2.2.4

        lsb_release -a
        Description:    Ubuntu 12.04.5 LTS

        uname -a
        Linux ... 3.5.0-55-generic #82~precise1-Ubuntu SMP Tue Sep 16 06:26:39
UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

However, I can provide one clue.  If I open the same spreadsheet using
LibreOffice calc Version Build ID 350m1(Build:2) and save it as
a different file named "File2.xlsx"; using the "Microsoft Excel
2007/2010 XML (.xlsx)" format, then:
        octave:3> A = xlsread ("File2.xlsx", 'First_Table', 'A5:Y67');
This works just fine!

Has anybody encountered such a problem or have clues as to what is
wrong.  I tried somewhat to debug it but I got lost in how line 237 of
__OCT_xlsx2oct__.m & line 36 of cell2mat.m work... :)

Apparently, the decoding of the .../xl/worksheet/Sheet1.xml file is
getting clobbered.

My workaround has been to export the MS-Excel file to a .csv file and
use textread, but I was trying to read the .xlsx file directly.

Thanks for any help/fix that may be advised.
Regards, JMB
Help-octave mailing list

icq: 167498924
XMPP|Jabber: address@hidden

Hello Markus,

Thanks for your reply.  I will try io_2.2.5 and experiment with it when it becomes available.  In the meantime I will try to create an .xlsx file I can attach for this forum to use for debugging.

Regards, JMB

reply via email to

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