Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Parsing large excel file

by Anonymous Monk
on Oct 03, 2010 at 11:48 UTC ( #863169=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to parse a large excel file - around 50MBytes (22 cols - unknown rows ).

I have tried Spreadsheet::ParseExcel, but it just hugs memory & cpu without doing anything ... even with a simple script like:

#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; $|++; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse('1.xls'); if ( !defined $workbook ) { die $parser->error(), ".\n"; } my $worksheet = $workbook->worksheet(0); my $cell = $worksheet->get_cell(1,1); print "value: ", $cell->value();

My target is to load this info into MySQL if there's a simpler method I would appreciate it.

Replies are listed 'Best First'.
Re: Parsing large excel file
by Corion (Pope) on Oct 03, 2010 at 12:03 UTC

      Thanks, This has helped.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://863169]
Approved by marto
help
Chatterbox?
[choroba]: I have no idea :-( I used to post to photobucket.com, but they don't seem to feature "private" pictures in the free version now
[Discipulus]: dazz i'm not an experts but i think it would be possible
[Corion]: dazz: I think Image::Magick can "read" from an in-memory filehandle
[Corion]: choroba: No, some general admin discussion of how to handle (company) user accounts
[Discipulus]: might be it is necessary to pass the pic data like MIME::Base64:: encode( data..
[Discipulus]: if you have a jpeg data: or as wise Corion said IM ca n read directly your handle

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2017-03-27 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (317 votes). Check out past polls.