in reply to Re: Out of Memory
in thread Out of Memory
Ok - I am looking at XLSX to see if I can make changes to remove stuff I dont need - since all i am trying to do in the production code is read the cell value and write it out to csv file
Can I eliminate all that excel style processing?my $member_styles = $self -> {zip} -> memberNamed ('xl/styles. +xml'); my @styles = (); my %style_info = (); if ($member_styles) { foreach my $t ($member_styles -> contents =~ /xf\ numF +mtId="([^"]*)"(?!.*\/cellStyleXfs)/gsm) { #" # $t = $converter -> convert ($t) if $converter +; push @styles, $t; } my $default = $1 || ''; foreach my $t1 (@styles){ $member_styles -> contents =~ /numFmtId="$t1" formatCode=" +([^"]*)/; my $formatCode = $1 || ''; if ($formatCode eq $default || not($formatCode)){ if ($t1 == 9 || $t1==10){ $formatCode="0.00000%";} elsif ($t1 == 14){ $formatCode="m-d-yy";} else { $formatCode=""; } } $style_info{$t1} = $formatCode; $default = $1 || ''; } }
Also, I am considering reducing the cell object size by removing format and type hash keys So change
TO} my $cell =Spreadsheet::ParseExcel::Cell->new( Val => $v, Format => $thisstyle, Type => $type );
Please let me know what you think} my $cell =Spreadsheet::ParseExcel::Cell->new( Val => $v );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Out of Memory
by vkon (Curate) on May 05, 2011 at 19:26 UTC | |
by ETLTCHFIG (Novice) on May 05, 2011 at 19:45 UTC | |
by ETLTCHFIG (Novice) on May 05, 2011 at 20:31 UTC | |
by vkon (Curate) on May 06, 2011 at 06:17 UTC |