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,
Code :
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++){
System.out.println(TestCases[i][1]);
}
}
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
a
b
c
d
e
f
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
Regards!
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.