Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: ParseExcel Again

by marto (Chancellor)
on Feb 13, 2013 at 10:24 UTC ( #1018515=note: print w/ replies, xml ) Need Help??


in reply to ParseExcel Again

"How can I increase the speed of code ??"

What code? You haven't shown any or linked to existing posts on this topic.


Comment on Re: ParseExcel Again
Re^2: ParseExcel Again
by Anonymous Monk on Feb 13, 2013 at 10:36 UTC

    Its normal code to parse .xls

    $excelRowCounter=0; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \&excelCellhandle +r, NotSetCell => 1, Parameters => "XXXXXXXXX" ); $parser->parse($currentFile); sub excelCellhandler { # my $workbook = $_[0]; # my $sheet_index = $_[1]; my $row = $_[2]; # my $col = $_[3]; my $cell = $_[4]; my $q; if($excelRowCounter == $row) { $q = $cell->unformatted(); $text .= $v; } else { if(length($text) > 2097152) { do something return } $excelRowCounter = $row; $q = $cell->unformatted(); $text .= $v; } }

      If you are not happy with a CPAN module you will have to essentially re-write it ( or at least parts of it )

      You can get the code from CPAN or GitHub, find the chunks that you are using ( which might be a pain considering the number of sub-modules it has ) and then try to optimize it.

      Also that module does not look like it has been maintained in over two years, but you could try to get in touch with the maintainers.

      If you do manage to speed it up / improve it, you might want to submit a patch.

      Or you could just try and get the same data in CSV - is that possible?

        CSV is not an option. The module has so many dependecies that speeding it up or identifying functions which i dont require is very difficult

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018515]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (17)
As of 2014-10-30 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls