File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Hi I have a worksheet question I do not understand Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Hi I have a worksheet question I do not understand" Watch "Hi I have a worksheet question I do not understand" New topic
Author

Hi I have a worksheet question I do not understand

Mark Cuff
Greenhorn

Joined: Oct 21, 2012
Posts: 2

Write a line of code to call the method SixTimes() with the object myObject and output the results.
Thanks
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Hello Mark and welcome to the Ranch!

Please UseAMeaningfulSubjectLine for the topics you create and ShowSomeEffort when facing a problem.

The issue you are having is pretty simple, and requires some basic knowledge of Java programming.
Suppose you have the following class:

Now if you want to invoke a foo() method on an object of Foo class from, say, main method, you would write:

You can use the code above as a guideline for your question.


The quieter you are, the more you are able to hear.
Mark Cuff
Greenhorn

Joined: Oct 21, 2012
Posts: 2

Hi thanks for your response my problem is I have the java main and the driver and i am not really understanding to make one read from the other.
Dev Looper
Greenhorn

Joined: Oct 21, 2012
Posts: 2
Hi Mark,

As Kemal mentioned, state your problem clearly so that you could be helped..

1. what is 'the worksheet' question?..from the heading, it looks like you are reading an excel spreadsheet into a Java obj.
2. you just need to loop it through the worksheet rows, check if they are not nil, and then read the values...you might want to take a look at jxl.jar library.
3. what form of output are you expecting?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hi I have a worksheet question I do not understand