I have a class, I'm attempting, that takes excel type column and rows of data and outputs the results into a nice neat format.
//1st loop through all rows of data
for(int i = 2; i < Sheet2.getLastRow()+1; i++)
{
// grab first variable then the next var variable
String var1 = Sheet2.getText(i,4);
String var2 = Sheet2.getText(1 + i,4);
// if String variable is equal to the second
if(var1.equalsIgnoreCase(var2))
{
QUESTION HOW DO I GRAB THE FIRST VALUE THAT GETS THE BOOLEAN CONDITION TRUE?
// convert String to int
int newValue = Integer.parseInt(column6);
newValue = newValue + 4;
for(int z = 1; z <= 12; z++)
{
numVal = Integer.toString(z);
if(column6.equals(numVal))
{
Sheet1.setText(THE FIRST # VALUE HERE, newValue, Sheet2.getText(i, 6));
// setText(row,column, value)
// getText(row,column)
}
z = Integer.parseInt(numVal);
}
Sheet1.setText(THE FIRST # VALUE HERE, 0, column1);
Sheet1.setText(THE FIRST # VALUE HERE, 1, column2);
Sheet1.setText(THE FIRST # VALUE HERE, 2, column3);
Sheet1.setText(THE FIRST # VALUE HERE, 4, column4);
}
else
{
}
Dano
dskryzer@hotmail.com
What's your major malfunction
//1st loop through all rows of data
for(int i = 2; i < Sheet2.getLastRow()+1; i++)
{
// grab first variable then the next var variable
String var1 = Sheet2.getText(i,4);
String var2 = Sheet2.getText(1 + i,4);
// if String variable is equal to the second
if(var1.equalsIgnoreCase(var2))
{
QUESTION HOW DO I GRAB THE FIRST VALUE THAT GETS THE BOOLEAN CONDITION TRUE?
// convert String to int
int newValue = Integer.parseInt(column6);
newValue = newValue + 4;
for(int z = 1; z <= 12; z++)
{
numVal = Integer.toString(z);
if(column6.equals(numVal))
{
Sheet1.setText(THE FIRST # VALUE HERE, newValue, Sheet2.getText(i, 6));
// setText(row,column, value)
// getText(row,column)
}
z = Integer.parseInt(numVal);
}
Sheet1.setText(THE FIRST # VALUE HERE, 0, column1);
Sheet1.setText(THE FIRST # VALUE HERE, 1, column2);
Sheet1.setText(THE FIRST # VALUE HERE, 2, column3);
Sheet1.setText(THE FIRST # VALUE HERE, 4, column4);
}
else
{
}
Dano
dskryzer@hotmail.com
What's your major malfunction