[Top][All Lists]

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

RE: Import Excel data to GNU octave

From: Windhorn, Allen E [INDAUTO/LS/MKT]
Subject: RE: Import Excel data to GNU octave
Date: Fri, 27 Oct 2017 18:27:50 +0000


On Fri, Oct 27, 2017 at 5:13 AM, <address@hidden> wrote:

> i'm having a project in my class. it's about datamining softwares
> and i have chosen gnu octave.  I'm trying to import excel files to
> gnu but it's still not working so far.  i have already downloaded
> the i/o package, changed the excel file into .xlsx format, used the
> function file:=xlsread (filename, wsh, range, options, …) which is
> introduced in octave-forge. but i still have the same error
> everytime ...

In Octave, type "pkg list" and see what is displayed.  If the io
package is not in the list, then it is not installed.  It is just "pkg
install filename.tar.gz" where filename is the name of the package you
downloaded, but it has to be in the right directory to do this.
Easier to type "pkg install -forge io" and get it from the source.

If you see io in the list, then you have to load the package.  When
Octave installs a package it just makes it ready to load, but doesn't
automatically load it.  This keeps the workspace free of packages that
aren't needed.  This is how it goes:

>> help xlsread  # trying to use a package that isn't loaded
error: help: Functions for spreadsheet style I/O (.xls .xlsx .sxc .ods .dbf .wk1
etc.)  are provided in the io package.  See <>.

Please read <> to learn how you can
contribute missing functionality.

# so we get the same error message that you got if it is not loaded.

>> pkg load io  # Now we will load the package

>> help xlsread
'xlsread' is a function from the file 

 -- Function File: [NUMARR, TXTARR, RAWARR, LIMITS] = xlsread (FILENAME)
 -- Function File: [NUMARR, TXTARR, RAWARR, LIMITS] = xlsread (FILENAME,
 -- Function File: [NUMARR, TXTARR, RAWARR, LIMITS] = xlsread (FILENAME,
          RANGE) ...

# Now the command works as it should.

If you use a package frequently, you can make the package load at
startup by putting for instance "pkg load io" into a line in the
.octaverc file.


reply via email to

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