N
neo
The perl script does not parses d entire excel file.The problem is that
it just searches till d 9th record in the excel file.
the perl script
my $member = $FORM{'hiddenField'};
my $oExcel = new Spreadsheet:arseExcel;
my $oBook = $oExcel->Parse($ExcelFile);
my $chipcount=0,$drivercount=0;
#print("<div id=\"Layer9\" style=\"position:absolute; left:123px;
top:197px; width:654px; height:54px; z-index:15; overflow: hidden\">");
#print("<font size=3>hidden field is $member$member</font><br></div>");
# Read the excel file
foreach my $oWkS (@{$oBook->{Worksheet}})
{
defined $oWkS->{MaxRow};
for($i=1;$i<=$oWkS->{MaxRow};$i++)
{
if($oWkS->{Cells}[$i][$membername]->Value eq "")
{
next;
}
$fullname = $oWkS->{Cells}[$i][$membername]->Value;
if(index(lc($fullname),$member)!= -1)
{
#found the member
$outname = $fullname;
$outest = $oWkS->{Cells}[$i][$est]->Value;
$outtst = $oWkS->{Cells}[$i][$tst]->Value;
for($j=0;$i<=$oWkS->{MaxRow};$i++)
{
print("row $i name $fullname<br>");
$outdriver[$drivercount] =
$oWkS->{Cells}[$i][$driver]->Value;
if($outdriver[$drivercount] ne "")
{
$drivercount++;
}
if($i<$oWkS->{MaxRow})
{
if($oWkS->{Cells}[$i+1][$membername]->Value ne "")
{
last;
}
}
}
last;
}
else
{
print("row $i name $fullname<br>");
}
}
}
please help me out
it just searches till d 9th record in the excel file.
the perl script
my $member = $FORM{'hiddenField'};
my $oExcel = new Spreadsheet:arseExcel;
my $oBook = $oExcel->Parse($ExcelFile);
my $chipcount=0,$drivercount=0;
#print("<div id=\"Layer9\" style=\"position:absolute; left:123px;
top:197px; width:654px; height:54px; z-index:15; overflow: hidden\">");
#print("<font size=3>hidden field is $member$member</font><br></div>");
# Read the excel file
foreach my $oWkS (@{$oBook->{Worksheet}})
{
defined $oWkS->{MaxRow};
for($i=1;$i<=$oWkS->{MaxRow};$i++)
{
if($oWkS->{Cells}[$i][$membername]->Value eq "")
{
next;
}
$fullname = $oWkS->{Cells}[$i][$membername]->Value;
if(index(lc($fullname),$member)!= -1)
{
#found the member
$outname = $fullname;
$outest = $oWkS->{Cells}[$i][$est]->Value;
$outtst = $oWkS->{Cells}[$i][$tst]->Value;
for($j=0;$i<=$oWkS->{MaxRow};$i++)
{
print("row $i name $fullname<br>");
$outdriver[$drivercount] =
$oWkS->{Cells}[$i][$driver]->Value;
if($outdriver[$drivercount] ne "")
{
$drivercount++;
}
if($i<$oWkS->{MaxRow})
{
if($oWkS->{Cells}[$i+1][$membername]->Value ne "")
{
last;
}
}
}
last;
}
else
{
print("row $i name $fullname<br>");
}
}
}
please help me out