L
lance-news
Hey all,
Trying to create a loop and need some help
in concatenation
My current syntax:
$Sheet->Cells(16,2)->{Value} = $Ja13_1;
$Sheet->Cells(16,3)->{Value} = $Ja13_2;
$Sheet->Cells(16,4)->{Value} = $Ja13_3;
$Sheet->Cells(16,5)->{Value} = $Ja13_4;
$Sheet->Cells(16,6)->{Value} = $Ja13_5;
$Sheet->Cells(16,7)->{Value} = $Ja13_6;
$Sheet->Cells(34,2)->{Value} = $Ks13_1;
$Sheet->Cells(34,3)->{Value} = $Ks13_2;
$Sheet->Cells(34,4)->{Value} = $Ks13_3;
$Sheet->Cells(34,5)->{Value} = $Ks13_4;
$Sheet->Cells(34,6)->{Value} = $Ks13_5;
$Sheet->Cells(34,7)->{Value} = $Ks13_6;
What I am trying to do:
for (my $i=2; $i=7; $i++){
$Sheet->Cells(16,$i)->{Value} = "$Ja13_"."$i-1";
}
but doesn't work.
Also, how could I incorporate an array so I could create 2 loops such
that all the lines above compress to one line?
Thanks in advance,
Lance
Trying to create a loop and need some help
in concatenation
My current syntax:
$Sheet->Cells(16,2)->{Value} = $Ja13_1;
$Sheet->Cells(16,3)->{Value} = $Ja13_2;
$Sheet->Cells(16,4)->{Value} = $Ja13_3;
$Sheet->Cells(16,5)->{Value} = $Ja13_4;
$Sheet->Cells(16,6)->{Value} = $Ja13_5;
$Sheet->Cells(16,7)->{Value} = $Ja13_6;
$Sheet->Cells(34,2)->{Value} = $Ks13_1;
$Sheet->Cells(34,3)->{Value} = $Ks13_2;
$Sheet->Cells(34,4)->{Value} = $Ks13_3;
$Sheet->Cells(34,5)->{Value} = $Ks13_4;
$Sheet->Cells(34,6)->{Value} = $Ks13_5;
$Sheet->Cells(34,7)->{Value} = $Ks13_6;
What I am trying to do:
for (my $i=2; $i=7; $i++){
$Sheet->Cells(16,$i)->{Value} = "$Ja13_"."$i-1";
}
but doesn't work.
Also, how could I incorporate an array so I could create 2 loops such
that all the lines above compress to one line?
Thanks in advance,
Lance