help-octave
[Top][All Lists]
Advanced

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

Re: Problem with sheet identifier in xls2oct


From: Philip Nienhuis
Subject: Re: Problem with sheet identifier in xls2oct
Date: Sat, 27 Aug 2016 13:49:33 -0700 (PDT)

Joao Rodrigues wrote
> Dear list members
> 
> I want to use older code I had to open xls data which stopped working. 
> Essentially I cannot declare which sheet xls2oct is supposed to open. A 
> minimal example is as follows:
> 
> I created an xlsx file with a 'Sheet1' worksheet and some content in
> A1:A3.
> 
> Then I run inside octave:
> 
> pkg load io
> xls = xlsopen('test.xlsx');
> sheetstr = 'Sheet1';
> tmp = xls2oct (xls, 'Sheet1', 'A1:A3');
> 
> and I get the following error:
> 
> error: @col2num: no function and no method found
> error: called from
>      __OCT_xlsx2oct__ at line 301 column 12
>      xls2oct at line 210 column 27
> error: evaluating argument list element number 1
> 
> with the last four lines repeated several times.
> 
> But the pointer to xls seems to be fine:
> 
> xls =
> 
>    scalar structure containing the fields:
> 
>      xtype = OCT
>      app = xlsx
>      filename = test.xlsx
>      workbook = /tmp/oct-RvkTuI
>      changed = 0
>      limits = [](0x0)
>      sheets =
> 
>        scalar structure containing the fields:
> 
>          sh_names =
>          {
>            [1,1] = Sheet1
>          }
>          rid =  2
>          sheetid =  1
>          rels =
> 
>             2   1
> 
> If I repeat the offending command by
> 
> tmp = xls2oct (xls, 1, 'A1:A3');
> 
> or
> 
> tmp = xls2oct (xls,  xls.sheets.sh_names{1}, 'A1:A3');
> 
> I get the same error.
> 
> Octave version is 4.0.0
> OS is Ubuntu 15.10

just a couple of questions:

- Which io package version ?  (type: 
pkg list
in the Octave terminal)

- what output do you get from
xlsfinfo ("test.xlsx")
?
(I'd guess more or less the same error message)

Looking at the actual error message "error: @col2num: no function and no
method found" I suspect a faulty io package installation. Reinstalling it
might help.

But let's await your answers.

Thanks,

Philip



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-with-sheet-identifier-in-xls2oct-tp4679504p4679510.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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