Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: ParseExcel Again

by marto (Cardinal)
on Feb 13, 2013 at 10:24 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1018515]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-16 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found