Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Keyboard Driven Automation using Java - Store Vector data into variable

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Thanked 0 Times in 0 Posts

    Default Keyboard Driven Automation using Java - Store Vector data into variable

    Hello I am beginner please have a little patience with my skills...

    If I have this,

     for ( int i = 1 ; i <steps.length ; i++) 
    			 if (steps[i][2].equalsIgnoreCase("YES"))  
                            String tc = Pasos[i][1].toString();
                            TestCases = excelRead(tc);
                            for ( int k = 1 ; k < TestCases.length ; k++){

    In this code.... I am trying to print the content of two excel sheets, I am using Apache POI for reading.. the problem is that it reads every sheet based on the "if (steps[i][2].equalsIgnoreCase("YES")) " statement so if I want to print out the result, I will get in the same result the content of every sheet, for example if in my sheet 1 marked as YES i have in the 2nd column abc, and in the sheet 2 I have in the second column def, my printout will show


    I need to create and variable that stores the content "abc" of the first sheet... and then when it goes to read the second sheet also marked with YES, store its value in a different variable... so i cant print separately content from sheet 1 and sheet 2 , and even concatenate it for obtain,

    a d
    b e
    c f

    My english is poor , excuse me


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 688 Times in 675 Posts

    Default Re: Keyboard Driven Automation using Java - Store Vector data into variable

    I think your English is fine (although you had me going with "Keyboard Driven Automation" - I imagined a player piano), but even so I don't understand the problem. It almost sounds like you could use a multiple dimensioned array with the number of rows the same as the items being searched for, and the number of columns the same as the number of sheets being searched. I'm not sure what's being stored in the array, but perhaps if you think on that approach you can frame the question or problem more clearly.

Similar Threads

  1. Replies: 5
    Last Post: January 14th, 2013, 08:50 AM
  2. how to get a data from database and store it in a variable?
    By jabaman in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 6th, 2012, 02:34 PM
  3. How to store char variable in an array
    By ashboi in forum Java Theory & Questions
    Replies: 1
    Last Post: November 9th, 2012, 11:48 AM
  4. How do i store input from the keyboard into a method?
    By javaStarter in forum Java Theory & Questions
    Replies: 2
    Last Post: December 23rd, 2011, 04:50 PM
  5. Using Vector, data get duplicated
    By khlitoshi in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 4th, 2011, 12:02 PM

Tags for this Thread