xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

classic Classic list List threaded Threaded
7 messages Options
cmt
Reply | Threaded
Open this post in threaded view
|

xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

cmt
Hi,
I am a freshmen working with Octave and I am struggling with loading some
.xlsx files. I hope someone might help me with it.

I will try to give you all the Information needed:
System: Microsoft Windows 10 Pro x64
Octave: 5.1.0.0

I used the following Code:
close all; clear all; clc;
pkg load io                    
pkg load windows
data_autokorr = xlsread ('file.xlsx', 'A16:C271');


I got the follwing error:
warning: findstr is obsolete; use strfind instead
Detected XLS interfaces: warning: duplicate type octave_com_object
COM*; warning:  No Java support found (no Java JRE? no Java pkg installed
AND loaded?)
warning: called from
    getxlsinterfaces at line 126 column 11
    xlsopen at line 262 column 17
    xlsread at line 233 column 11
    Spektrum at line 16 column 15


First I thought i have to install Java but in some  Topics
<https://wiki.octave.org/Java_package#How_to_install_the_java_package_in_Octave.3F>  
i found that i should not.

I also looked at other pages ( example
<http://octave.1599824.n4.nabble.com/Problem-with-java-package-and-xlsread-td4630893.html>
) and I dont seem to be the only Person struggling with xlsread. But I
coudnt find an answer that helped me, since I am really new into Octave.

Thank you very much in Advance!




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

mmuetzel
The output you provide doesn't show any errors.
Are you sure, the data you are trying to read is numeric? Maybe try the
following:
[data_autokorr_num, data_autokorr_str, data_autokorr_raw] = xlsread
('file.xlsx', 'A16:C271');

Please see also the documentation for xlsread:
help xlsread

Markus



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


cmt
Reply | Threaded
Open this post in threaded view
|

Re: xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

cmt
Hi mmuetzel,

thanks for your quick help. I tried your Code and it worked partially. The
data is read and stored in data_autokorr_num, data_autokorr_str,
data_autokorr_raw. The remaining Problem ist the Format. The original data
Looks like:
     0.000 12.000 15.000
     0.006 12.000 15.000
     0.012 12.000 15.000


but for data_autokorr_num I receive:
NaN 12000 15000
NaN 12000 15000
NaN 12000 15000

and for data_autokorr_raw:
     0.000 12000 15000
     0.006 12000 15000
     0.012 12000 15000

and for data_autokorr_str:
     0.000 12000 15000
     0.006 12000 15000
     0.012 12000 15000

Is it a Problem, that the german Version of Excel denote the "." as a
sperator for 10^3? But why does it work for the first column?



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

mmuetzel
In reply to this post by cmt
> Message: 2
> Date: Mon, 29 Jul 2019 03:06:04 -0500 (CDT)
> From: cmt <[hidden email]>
> To: [hidden email]
> Subject: Re: xlsread return error: No Java support found (no Java JRE?
> no Java pkg installed AND loaded?)
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Hi mmuetzel,
>
> thanks for your quick help. I tried your Code and it worked partially. The
> data is read and stored in data_autokorr_num, data_autokorr_str,
> data_autokorr_raw. The remaining Problem ist the Format. The original data
> Looks like:
>      0.000 12.000 15.000
>      0.006 12.000 15.000
>      0.012 12.000 15.000
>
>
> but for data_autokorr_num I receive:
> NaN 12000 15000
> NaN 12000 15000
> NaN 12000 15000
>
> and for data_autokorr_raw:
>      0.000 12000 15000
>      0.006 12000 15000
>      0.012 12000 15000
>
> and for data_autokorr_str:
>      0.000 12000 15000
>      0.006 12000 15000
>      0.012 12000 15000
>
> Is it a Problem, that the german Version of Excel denote the "." as a
> sperator for 10^3? But why does it work for the first column?
>

Since I don't know your Excel file, I don't know what output you should expect. So the following is just speculation:
It looks like the first column is formatted as text in Excel. The second and third columns are numeric.
How the numbers are formatted (thousands separator, currency, ...) in Excel doesn't really matter. Octave only reads the numbers.

Is it possible that the data in your original Excel file was imported from a text file? In this case, make sure to set up the correct decimal separators during import (in Excel). If you don't, the "text" in the first column might suddenly change to numbers above 1000 once the value passes "1.000"...

Are you sure data_autokorr_raw and data_autokorr_str contain exactly the same values?

Markus



Reply | Threaded
Open this post in threaded view
|

Re: xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

PhilipNienhuis
In reply to this post by cmt
cmt wrote

> Hi mmuetzel,
>
> thanks for your quick help. I tried your Code and it worked partially. The
> data is read and stored in data_autokorr_num, data_autokorr_str,
> data_autokorr_raw. The remaining Problem ist the Format. The original data
> Looks like:
>      0.000 12.000 15.000
>      0.006 12.000 15.000
>      0.012 12.000 15.000
>
>
> but for data_autokorr_num I receive:
> NaN 12000 15000
> NaN 12000 15000
> NaN 12000 15000
>
> and for data_autokorr_raw:
>      0.000 12000 15000
>      0.006 12000 15000
>      0.012 12000 15000
>
> and for data_autokorr_str:
>      0.000 12000 15000
>      0.006 12000 15000
>      0.012 12000 15000

You tried

data_autokorr = xlsread ('file.xlsx', 'A16:C271');

but better do

[data_autokorr, ~, rawdata] = xlsread ('file.xlsx', 'A16:C271');

The cell array rawdata will hold all data (numeric and text) so you can see
what format your first column was in the Excel file. Like Markus I suspect
it is text.

As to the error message about Java package, that is really looks outdated;
what does "pkg describe io" say?
I'll look into that but later, I'm abroad with patchy Internet access and
little time until after early August.

Philip




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

IsOct
Hi,
I am new to OCTAVE and unable to read xls file, getting the following error
                                                                                                                           
>> [data_autokorr_num, data_autokorr_str, data_autokorr_raw] =
>> xlsread(test.xls)
error: Invalid call to test.  Correct usage is:

 -- test NAME
 -- test NAME quiet|normal|verbose
 -- test ("NAME", "quiet|normal|verbose", FID)
 -- test ("NAME", "quiet|normal|verbose", FNAME)
 -- SUCCESS = test (...)
 -- [N, NMAX, NXFAIL, NBUG, NSKIP, NRTSKIP, NREGRESSION] = test (...)
 -- [CODE, IDX] = test ("NAME", "grabdemo")
 -- test ([], "explain", FID)
 -- test ([], "explain", FNAME)

Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at https://www.octave.org and via the [hidden email]
mailing list.




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: xlsread return error: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

nrjank
>> [data_autokorr_num, data_autokorr_str, data_autokorr_raw] =
>> xlsread(test.xls)
error: Invalid call to test.  Correct usage is:


(you should probably create a new message thread next time, your issues
seems unrelated to Java)

first, don't split up that command over two lines.  Second, test.xls needs
to be in quotes (filenames are strings).  I thinks you're trying to call the
function test.

try:

>> [data_autokorr_num, data_autokorr_str, data_autokorr_raw] =
>> xlsread("test.xls")



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html