On Wed, 30 Mar 2005 09:04:23 -0800, Wagner, David --- Senior Programmer Analyst --- WGO wrote: > > Sorry for not being clear. I can find the files I want, but to open > them takes way too long. > On my test node, to open the four files and get the first line of worksheet 1 > took almost 38 > minutes. Any other file processing would be over almost before it got > started, but with the MS > setup it does not work that way. Like I stated, I have tried both ParseExcel > and > parseExcel::Simple and each for some reason reads in the whole file at once. > > Is there a way to tell either of these modules to just open and allow > me to read what I > need and then stop. Also it can take up to another 5 to 10 minutes after my > program says it is > done, for the prompt to return also. > > Thanks for the reply, but is there any way to easily read something > from MS and NOT > have the overhead of the whole file being stuffed into memory. > > Wags ;)
Hi Wags, The following code, when reading a 3Meg file, took 21 seconds to run on a strong Linux machine, so figure x4 the time since you're running on Solaris, and another x4 for your 12Meg files, for a total of about 5 and a half minutes worst case. Here's the code: ################## begin code use strict; use warnings; use Spreadsheet::ParseExcel::Simple; my $xls_file = "filename.xls"; my $xls = Spreadsheet::ParseExcel::Simple->read($xls_file) or die "Couldn't read $xls_file: $!\n"; my $sheet = ($xls->sheets)[0]; # Sheet 1 my $data = ($sheet->next_row)[-1]; # last col of row 1 print "The name is: $data\n"; ################## end code I'd be interested in hearing what your runtime is. -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>