Import instrucction in NetRexx

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

Import instrucction in NetRexx

Quique Britto
I would like to use the "jexcelapi" in my programs but how I can tell Netrexx to use the library. The "jlx.jar" file is located in the following directory.

c:\jexcelapi


Yr help is much apreciated.

Thks

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

David Requena
Quique,

You somehow put jexcelapi.jar in the classpath then you pt appropriate import instructions in your code.

How you actually include the jar file in the classpath depends on how you are invoking the compiler. We
would need this info to further advise.

---
Saludos / Kind regards.
David Requena

El 18/03/2010 12:39, Quique Britto escribió:
I would like to use the "jexcelapi" in my programs but how I can tell Netrexx to use the library. The "jlx.jar" file is located in the following directory.

c:\jexcelapi


Yr help is much apreciated.

Thks
_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
classpath shows the whole directory, see below:

.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;




On 18 March 2010 13:38, David Requena <[hidden email]> wrote:
Quique,

You somehow put jexcelapi.jar in the classpath then you pt appropriate import instructions in your code.

How you actually include the jar file in the classpath depends on how you are invoking the compiler. We
would need this info to further advise.

---
Saludos / Kind regards.
David Requena

El 18/03/2010 12:39, Quique Britto escribió:
I would like to use the "jexcelapi" in my programs but how I can tell Netrexx to use the library. The "jlx.jar" file is located in the following directory.

c:\jexcelapi


Yr help is much apreciated.

Thks
_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

David Requena

El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
ok, i will add this "C:\NetRexx\Stats\jexcelapi\jxl.jar"jar' but how to I import this package in my program.

thks again


On 18 March 2010 13:53, David Requena <[hidden email]> wrote:

El 18/03/2010 13:48, Quique Britto escribió:

.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be 'C:\NetRexx\Stats\jexcelapi.jar'


---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Import instrucction in NetRexx

measel
In reply to this post by David Requena
/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Import instrucction in NetRexx

measel
Oh hit send too soon...
Should be
/* */
 theCell = getCell("Sheet1!A4")
 say theCell.getContents()

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Measel, Mike
Sent: Thursday, March 18, 2010 8:13 AM
To: IBM Netrexx
Subject: RE: [Ibm-netrexx] Import instrucction in NetRexx

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
In reply to this post by measel
import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass



On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:
/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
this is the method:

method excel
  excelf    = FileReader( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  myXbuffer = BufferedReader( excelf )
  wb        = Workbook.getWorkbook( myXbuffer )
  sheet     = wb.getSheet( 0 )
  ..
  ..
return

is the error not in the import?



On 18 March 2010 14:31, Quique Britto <[hidden email]> wrote:
import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass




On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:
/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Import instrucction in NetRexx

measel
In reply to this post by Quique Britto

It doesn’t like my bufferedreader. So use the file reference directly:  ( the javadoc specifies file but I neglect to read )

 

myWorkbook = getWorkbook(myXfile)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:31 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass


On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Import instrucction in NetRexx

measel
In reply to this post by Quique Britto

<learning from Mike’s mistakes>

No. If it were the import you would get a “class” not found instead of “method” not found.  Subtle but important distinction.

 

Notice that it says jxl.Workbook in the error message – it wouldn’t know that if it didn’t do the import.

 

It’s actually telling you that it didn’t find that method with that parameter of “java.io.bufferedreader”.  Watch for this when you are coding NetRexx as the java routines you are calling often like being passed a certain type of object.  NetRexx of course doesn’t make you “type” the object so I often get blown up here.  ;-)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:33 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

this is the method:

method excel
  excelf    = FileReader( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  myXbuffer = BufferedReader( excelf )
  wb        = Workbook.getWorkbook( myXbuffer )
  sheet     = wb.getSheet( 0 )
  ..
  ..
return

is the error not in the import?


On 18 March 2010 14:31, Quique Britto <[hidden email]> wrote:

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass




On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
In reply to this post by measel
after changing the code to the following,
method excel
  excelf    = File( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  wb        = Workbook.getWorkbook( excelf )
  sheet     = wb.getSheet( 0 )
  ..
return

i get the error:
due to forward reference in this method, the flwg exception must be specified as a signals list:
ioexceptio, biffexception

I add the "signals IOException, BiffException" to the end of the method excel but I receive.:
error: Exception type expected and the "BiffException" is underlined.

If I remove this the compiler claims that this is needed.

what now?





On 18 March 2010 14:35, Measel, Mike <[hidden email]> wrote:

It doesn’t like my bufferedreader. So use the file reference directly:  ( the javadoc specifies file but I neglect to read )

 

myWorkbook = getWorkbook(myXfile)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:31 AM


To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass


On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
In reply to this post by measel
that makes sense, thks



On 18 March 2010 14:45, Measel, Mike <[hidden email]> wrote:

<learning from Mike’s mistakes>

No. If it were the import you would get a “class” not found instead of “method” not found.  Subtle but important distinction.

 

Notice that it says jxl.Workbook in the error message – it wouldn’t know that if it didn’t do the import.

 

It’s actually telling you that it didn’t find that method with that parameter of “java.io.bufferedreader”.  Watch for this when you are coding NetRexx as the java routines you are calling often like being passed a certain type of object.  NetRexx of course doesn’t make you “type” the object so I often get blown up here.  ;-)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:33 AM


To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

this is the method:

method excel
  excelf    = FileReader( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  myXbuffer = BufferedReader( excelf )
  wb        = Workbook.getWorkbook( myXbuffer )
  sheet     = wb.getSheet( 0 )
  ..
  ..
return

is the error not in the import?


On 18 March 2010 14:31, Quique Britto <[hidden email]> wrote:

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass




On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

David Requena
In reply to this post by Quique Britto
Quique,

I think you also need to import BiffException.

---
Saludos / Kind regards.
David Requena

El 18/03/2010 14:48, Quique Britto escribió:
after changing the code to the following,
method excel
  excelf    = File( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  wb        = Workbook.getWorkbook( excelf )
  sheet     = wb.getSheet( 0 )
  ..
return

i get the error:
due to forward reference in this method, the flwg exception must be specified as a signals list:
ioexceptio, biffexception

I add the "signals IOException, BiffException" to the end of the method excel but I receive.:
error: Exception type expected and the "BiffException" is underlined.

If I remove this the compiler claims that this is needed.

what now?





On 18 March 2010 14:35, Measel, Mike <[hidden email]> wrote:

It doesn’t like my bufferedreader. So use the file reference directly:  ( the javadoc specifies file but I neglect to read )

 

myWorkbook = getWorkbook(myXfile)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:31 AM


To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass


On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Import instrucction in NetRexx

measel
In reply to this post by Quique Britto

So if you want to wrap with a method you need

 

method excel signals IOException, BiffException

do stuff

    …    

   catch ioe = IOException

   say 'IOException caught:' ioe '\n  ' ioe.getMessage()

   …

   catch bie = BiffException

   say ‘Biff Exception:’ bie ‘\n ‘ bie.getMessage()

    …

end

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:48 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

after changing the code to the following,
method excel
  excelf    = File( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  wb        = Workbook.getWorkbook( excelf )
  sheet     = wb.getSheet( 0 )
  ..
return

i get the error:
due to forward reference in this method, the flwg exception must be specified as a signals list:
ioexceptio, biffexception

I add the "signals IOException, BiffException" to the end of the method excel but I receive.:
error: Exception type expected and the "BiffException" is underlined.

If I remove this the compiler claims that this is needed.

what now?




On 18 March 2010 14:35, Measel, Mike <[hidden email]> wrote:

It doesn’t like my bufferedreader. So use the file reference directly:  ( the javadoc specifies file but I neglect to read )

 

myWorkbook = getWorkbook(myXfile)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:31 AM


To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass

On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

Quique Britto
In reply to this post by David Requena
this may a silly question but how do I do that.



On 18 March 2010 14:55, David Requena <[hidden email]> wrote:
Quique,

I think you also need to import BiffException.


---
Saludos / Kind regards.
David Requena

El 18/03/2010 14:48, Quique Britto escribió:
after changing the code to the following,
method excel
  excelf    = File( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  wb        = Workbook.getWorkbook( excelf )
  sheet     = wb.getSheet( 0 )
  ..
return

i get the error:
due to forward reference in this method, the flwg exception must be specified as a signals list:
ioexceptio, biffexception

I add the "signals IOException, BiffException" to the end of the method excel but I receive.:
error: Exception type expected and the "BiffException" is underlined.

If I remove this the compiler claims that this is needed.

what now?





On 18 March 2010 14:35, Measel, Mike <[hidden email]> wrote:

It doesn’t like my bufferedreader. So use the file reference directly:  ( the javadoc specifies file but I neglect to read )

 

myWorkbook = getWorkbook(myXfile)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:31 AM


To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass


On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Import instrucction in NetRexx

David Requena
Quique,

Sorry for the late reply. I had to look at the javadoc for this API.

By putting "import jxl." you are importing all calsses contained in this package but
not in sub-packages. So:

import jxl.
import jxl.read.biff.


Then BiffException would become defined by shortname. Alternatively you could not import
and simply put "signals IOException, jxl.read.biff.BiffException" in your method declaration.

---
Saludos / Kind regards.
David Requena

El 18/03/2010 17:43, Quique Britto escribió:
this may a silly question but how do I do that.



On 18 March 2010 14:55, David Requena <[hidden email]> wrote:
Quique,

I think you also need to import BiffException.


---
Saludos / Kind regards.
David Requena

El 18/03/2010 14:48, Quique Britto escribió:
after changing the code to the following,
method excel
  excelf    = File( "C:\\NetRexx\\Stats\\Vessels\\Statistic_MD2_2010.XLS" )
  wb        = Workbook.getWorkbook( excelf )
  sheet     = wb.getSheet( 0 )
  ..
return

i get the error:
due to forward reference in this method, the flwg exception must be specified as a signals list:
ioexceptio, biffexception

I add the "signals IOException, BiffException" to the end of the method excel but I receive.:
error: Exception type expected and the "BiffException" is underlined.

If I remove this the compiler claims that this is needed.

what now?





On 18 March 2010 14:35, Measel, Mike <[hidden email]> wrote:

It doesn’t like my bufferedreader. So use the file reference directly:  ( the javadoc specifies file but I neglect to read )

 

myWorkbook = getWorkbook(myXfile)

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Quique Britto
Sent: Thursday, March 18, 2010 8:31 AM


To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx

 

import jxl does not seem to work.
Using yr example below replacing the xls file I receive the following error.:

the method getWorkbook (java.io.BufferedReader) cannot be found in class "jxl.Workbook" or superclass


On 18 March 2010 14:12, Measel, Mike <[hidden email]> wrote:

/* */
 import jxl.
 myXfile = FileReader("testdata.xls")
 myXbuffer = BufferedReader(myXfile)
 myWorkbook = getWorkbook(myXbuffer)
 say getCell("Sheet1!A4")


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Thursday, March 18, 2010 7:54 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Import instrucction in NetRexx


El 18/03/2010 13:48, Quique Britto escribió:
> .;C:\Program
> Files\Java\jdk1.6.0_10\lib\tools.jar;C:\NetRexx\Projects\Jars\miglayout-3.7.1-swing-java14.jar;c:\netrexx\stats\";C:\NetRexx\Stats\jexcelapi;

Last element shown in your classpath should be
'C:\NetRexx\Stats\jexcelapi.jar'

---
Saludos / Kind regards.
David Requena


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]