Issues with xlsopen

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issues with xlsopen

SteveS

Hi,

 

I am using Windows 7, I have JRE installed and I have Excel 2010.

I have Octave V 4.2.0, and I have installed  io-2.4.5.tar.gz

I have loaded io

 

I am trying to read an xlsx file using xlsread – this has worked very well for me in the past, but now for some reason is unable to open the file. It seems to be failing at the xlsopen so I tried explicitly to xlsopen the file.

This is what I get….

 

>> dd=xlsopen('Steve1.xlsx')

Detected XLS interfaces: warning: xls2open: file Steve1.xlsx couldn't be unzipped

warning: __OCT_spsh_open__: some elements in list of return values are undefined

warning: called from

    __OCT_spsh_open__ at line 85 column 7

    xlsopen at line 314 column 30

None.

warning: xlsopen.m: no'.xlsx' spreadsheet I/O support with available interfaces.

dd = [](0x0)

>> 

 

I have looked around on the web for solutions to this issue, but most solutions refer to the java package which is now incorporated in v4.2.0 so they seem not to be relevant.

 

I would really appreciate some guidance on this problem please.

 

Thanks

Steve


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

PhilipNienhuis
Steve Shearer wrote
Hi,

I am using Windows 7, I have JRE installed and I have Excel 2010.
I have Octave V 4.2.0, and I have installed  io-2.4.5.tar.gz
I have loaded io

I am trying to read an xlsx file using xlsread - this has worked very well for me in the past, but now for some reason is unable to open the file. It seems to be failing at the xlsopen so I tried explicitly to xlsopen the file.
This is what I get....

>> dd=xlsopen('Steve1.xlsx')
Detected XLS interfaces: warning: xls2open: file Steve1.xlsx couldn't be unzipped
warning: __OCT_spsh_open__: some elements in list of return values are undefined
warning: called from
    __OCT_spsh_open__ at line 85 column 7
    xlsopen at line 314 column 30
None.
warning: xlsopen.m: no'.xlsx' spreadsheet I/O support with available interfaces.
dd = [](0x0)
>>

I have looked around on the web for solutions to this issue, but most solutions refer to the java package which is now incorporated in v4.2.0 so they seem not to be relevant.

I would really appreciate some guidance on this problem please.
OK some suggestions...:

Have you tried with another spreadsheet file?

There's a helper function for these things in the io package.
So what does

chk_spreadsheet_support ("", 3)

tell you?

What happens if you also load the windows package?

There have been some recent posts here and bug reports with workarounds for several xlsread issues; did you see those?

Philip

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

SteveS
Philip,

Thanks for your reply. I have just installed the most recent Octave for Windows as well as the latest Java JRE.

I have tried another spreadsheet file, both .xlsx and .xls.
Below is the result of chk_spreadsheet_report.
I do not understand what you mean by "also load the windows package"
I have searched around this forum, and other places with no success.
I would appreciate any help you could offer.

Steve

>> chk_spreadsheet_support ("", 3)

(OCT interface... OK, included in io package)

Checking Excel/ActiveX/COM... not working.
1. Checking Octave's Java support... OK.
2. Checking Java dependencies...
  Checking Java JRE presence.... OK, found one.
  Java seems to work OK.
  Java (version 1.8.0_121) seems OK.
  Maximum JVM memory:   886 MiB; sufficient.
Checking javaclasspath for .jar class libraries needed for spreadsheet I/O...:

Basic POI (.xls) <poi-3> <poi-ooxml>:
  apache-poi./poi-3....jar missing
  apache-poi-ooxml./poi-ooxml-3....jar missing
  => Not all classes (.jar) required for POI in classpath

POI OOXML (.xlsx) <xbean/xmlbean> <poi-ooxml-schemas> <dom4j>:
  xbean/xmlbean....jar missing
  apache-poi-ooxml-schemas/poi-ooxml-schemas....jar missing
  dom4j....jar missing
  => Some classes for POI OOXML support missing

JExcelAPI (.xls (incl. BIFF5 read)) <jxl>:
  jxl....jar missing
  => Not all required classes (.jar) for JXL in classpath

OpenXLS (.xls - BIFF8 & .xlsx - OOXML) <OpenXLS>:
  OpenXLS....jar missing
  gwt-servlet-deps....jar missing

ODF Toolkit (.ods) <odfdom> <xercesImpl>:
  odfdom....jar missing
  xerces....jar missing
  xml-apis/xml-commons-apis....jar missing
  => Not all required classes (.jar) in classpath for OTK

jOpenDocument (.ods + experimental .sxc readonly) <jOpendocument>:
  jOpenDocument....jar missing
  => Not all required classes (.jar) for JOD in classpath

UNO/Java (.ods, .xls, .xlsx, .sxc) <OpenOffice.org>:
  program....jar missing
  unoil....jar missing
  jurt....jar missing
  juh....jar missing
  unoloader....jar missing
  ridl....jar missing
  => One or more UNO classes (.jar) missing in javaclasspath
Some class libs lacking yet...

ans = 0
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

PhilipNienhuis
SteveS wrote
Philip,

Thanks for your reply. I have just installed the most recent Octave for Windows as well as the latest Java JRE.

I have tried another spreadsheet file, both .xlsx and .xls.
Below is the result of chk_spreadsheet_report.
I do not understand what you mean by "also load the windows package"
I have searched around this forum, and other places with no success.
I would appreciate any help you could offer.

Steve

>> chk_spreadsheet_support ("", 3)

(OCT interface... OK, included in io package)

Checking Excel/ActiveX/COM... not working.
1. Checking Octave's Java support... OK.
2. Checking Java dependencies...
  Checking Java JRE presence.... OK, found one.
  Java seems to work OK.
  Java (version 1.8.0_121) seems OK.
  Maximum JVM memory:   886 MiB; sufficient.
Checking javaclasspath for .jar class libraries needed for spreadsheet I/O...:

Basic POI (.xls) <poi-3> <poi-ooxml>:
  apache-poi./poi-3....jar missing
  apache-poi-ooxml./poi-ooxml-3....jar missing
  => Not all classes (.jar) required for POI in classpath

POI OOXML (.xlsx) <xbean/xmlbean> <poi-ooxml-schemas> <dom4j>:
  xbean/xmlbean....jar missing
  apache-poi-ooxml-schemas/poi-ooxml-schemas....jar missing
  dom4j....jar missing
  => Some classes for POI OOXML support missing

JExcelAPI (.xls (incl. BIFF5 read)) <jxl>:
  jxl....jar missing
  => Not all required classes (.jar) for JXL in classpath

OpenXLS (.xls - BIFF8 & .xlsx - OOXML) <OpenXLS>:
  OpenXLS....jar missing
  gwt-servlet-deps....jar missing

ODF Toolkit (.ods) <odfdom> <xercesImpl>:
  odfdom....jar missing
  xerces....jar missing
  xml-apis/xml-commons-apis....jar missing
  => Not all required classes (.jar) in classpath for OTK

jOpenDocument (.ods + experimental .sxc readonly) <jOpendocument>:
  jOpenDocument....jar missing
  => Not all required classes (.jar) for JOD in classpath

UNO/Java (.ods, .xls, .xlsx, .sxc) <OpenOffice.org>:
  program....jar missing
  unoil....jar missing
  jurt....jar missing
  juh....jar missing
  unoloader....jar missing
  ridl....jar missing
  => One or more UNO classes (.jar) missing in javaclasspath
Some class libs lacking yet...

ans = 0
Thanks, (to me) that's clear.
(1) COM doesn't work, so you could try to load the windows package by issuing in the Octave terminal:
pkg load windows
## and then
chk_spreadsheet_support ("", 3)

## - you should see a message that Excel/ActiveX/COM is now working.

(2) Java works fine
(3) You haven't installed any Java support SW to be able to read spreadsheet files other than .xlsx, .ods and .gnumeric.
Fine.

So your .xlsx should be readable by at least the built-in OCT interface.
One you got the windows package loaded, it should also be readable using the COM interface. If you just repeat the xlsopen command then, the COM interface should be selected automatically.

If even the COM interface doesn't read the offending .xlsx file, I suppose that file is just borked.
But if it can, could you please upload the file (preferrably in a new bug report)? Then I can investigate why it isn't unzippable.

And again: have you tried with another .xlsx file?

Philip
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

SteveS
Thanks a lot!  I didnt realise that there was a windows "package" - my bad.
Anyway now that I have that loaded it all works fine. Many thanks!
Steve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

PhilipNienhuis
SteveS wrote
Thanks a lot!  I didnt realise that there was a windows "package" - my bad.
Anyway now that I have that loaded it all works fine. Many thanks!
Steve
Well if Excel can read it and Octave/OCT interface not, would you like toupload that file?
Then I can have a look at it and check why Octave cannot read it w/o windows package.

Thanks,

Philip
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

SteveS
Thanks Philip, the issue is resolved with the loading of the windows pkg.
Steve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with xlsopen

PhilipNienhuis
SteveS wrote
Thanks Philip, the issue is resolved with the loading of the windows pkg.
Steve
Yes I understood that part.

But w/o the windows package reading the file should have been possible as well.
The fact that you got errors show there's something wrong with the OCT interface.
To be able to fix that I need a file showing the problem.
You got such a file.
So I kindly ask if you would be willing to share it so I can have a look and can fix Octave's native OCT interface.

Philip
Loading...