in reply to Re: Re: Out of memory using Spreadsheet::ParseExcel
in thread Out of memory using Spreadsheet::ParseExcel
Personally, I think that Takanori Kawai didn't fully understand the language when he wrote it.sub _NewCell($$$%) { my($oBook, $iR, $iC, %rhKey)=@_; my($sWk, $iLen); return undef unless(defined $oBook->{_CurSheet}); my $oCell = Spreadsheet::ParseExcel::Cell->new( Val => $rhKey{Val}, FormatNo=> $rhKey{FormatNo}, Format => $rhKey{Format}, # Code => $rhKey{Code}, # Type => $oBook->{FmtClass}->ChkType( # $rhKey{Numeric}, # $rhKey{Format}->{FmtIdx}), ); # $oCell->{_Kind} = $rhKey{Kind}; $oCell->{_Value} = $oBook->{FmtClass}->ValFmt($oCell, $oBook); # if($rhKey{Rich}) { # my @aRich = (); # my $sRich = $rhKey{Rich}; # for(my $iWk=0;$iWk<length($sRich); $iWk+=4) { # my($iPos, $iFnt) = unpack('v2', substr($sRich, $iWk)); # push @aRich, [$iPos, $oBook->{Font}[$iFnt]]; # } # $oCell->{Rich} = \@aRich; # } if(defined $_CellHandler) { if(defined $_Object){ no strict; ref($_CellHandler) eq "CODE" ? $_CellHandler->($_Object, $oBook, $oBook->{_CurShe +et}, $iR, $iC, $oCell) : $_CellHandler->callback($_Object, $oBook, $oBook-> +{_CurSheet}, $iR, $iC, $oCell); } else{ $_CellHandler->($oBook, $oBook->{_CurSheet}, $iR, $iC, $oC +ell); } } unless($_NotSetCell) { $oBook->{Worksheet}[$oBook->{_CurSheet}]->{Cells}[$iR][$iC] = $oCell; } return $oCell; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(4): Out of memory using Spreadsheet::ParseExcel
by talexb (Chancellor) on Feb 26, 2002 at 16:15 UTC | |
by dragonchild (Archbishop) on Feb 26, 2002 at 16:26 UTC |