Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: ParseExcel Again

by marto (Bishop)
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.

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
Node Status?
node history
Node Type: note [id://1018515]
help
Chatterbox?
[Discipulus]: i propend for removing: why? because we are so few that we must find i minimal common divisor, this is certainly Perl not our (anyway private) thougths. And i say this still wondering because i love a lot freedom of expression. And i say this not for roho
[1nickt]: Discipulus that was the point of my story of taking the sticker off my truck. I know there are lots of people in the world who if I knw their private beliefs I might want to argue with them. And they with me. But life cannot all be arguments!
[1nickt]: This is less than perfect ... but demanding perfection (from people or from life) is a sure way to unhappiness.
[Discipulus]: and anyway we have CB where every (democratic) opinion can be expressed
erix eat the rich!
[1nickt]: I do think it is sad that roho has received 3 downvotes for his polite request, as did I when I objected to the profanity in stonecolddevin's sig. I upvoted both him and Karl for the discussion. Way too much downvoting for inappropriate reasons here!
Discipulus learn that 'argue' has a little negative sense, he thought was a neutral sense, 'vox media'
[1nickt]: argue == discuss && argue == be contentious
[Discipulus]: you are right 1nickt i didnt voted nor downvoted; I just upvote perl content i like
[1nickt]: In Spanish, to argue (like a fight) is discutir -- does not mean to discuss !

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-06-22 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.