Is it possible for you to export the XLS file to a CSV and then process it that way without having to go through the OLE modules?  I used to process Word documents using Perl and at a certain point I would run into issues with the OLE, or it would just take a long time since Perl was spending most of its time actually waiting on the OLE stuff to do its thing.  If you can export it to a CSV.  I haven&#39;t had issues with processing just CSV data.  <br>
<br>If you do need to write things back to a destination of some sort while you&#39;re processing, maybe importing it into a databse (MySQL, PostgreSQL) might be good, since you could create a database with a table holding the data you&#39;re processing and then create whatever other tables you need to store the results of your work.  You could then dump the final product out into a CSV file (or files) and reprocess it as need be.<br>
<br>Randy<br><br><div class="gmail_quote">On Thu, Jul 23, 2009 at 2:21 PM, Eric Ellington <span dir="ltr">&lt;<a href="mailto:e.ellington@gmail.com">e.ellington@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I used to do this a bunch. You mention 133k rows. Excel used to max<br>
out around something like 65k rows. Maybe I am out of date but how is<br>
so much data crammed into a single worksheet?<br>
<br>
What packages are you using?<br>
<br>
Thanks,<br>
<br>
Eric<br>
<div><div></div><div class="h5"><br>
On Thu, Jul 23, 2009 at 12:20 PM, John Warner&lt;<a href="mailto:jwarner@texas.net">jwarner@texas.net</a>&gt; wrote:<br>
&gt; All,<br>
&gt;<br>
&gt; I have a project where I am trying to filter through a large amount of data<br>
&gt; from an Excel spreadsheet.  Since I don&#39;t have access to the databases where<br>
&gt; the data actually resides, I have to use a spreadsheet that was given to me.<br>
&gt; The spreadsheet contains 79 columns and approximately 113k rows.  The data<br>
&gt; are customer satisfaction survey results along with a plethora of other<br>
&gt; garbage I don&#39;t need.  I am only interested in a few columns.<br>
&gt;<br>
&gt; My code goes like this...<br>
&gt;<br>
&gt; Create an Excel Object<br>
&gt; Use Object to open Source and Destination spreadsheets<br>
&gt; Find the column and row boundaries of where data is within the source.<br>
&gt;<br>
&gt; my @ArrayOfNames = (&#39;Bill&#39;, &#39;Bob&#39;, &#39;Jane&#39;, &#39;Tom&#39;, &#39;Dick&#39;, &#39;Harry&#39;);<br>
&gt;<br>
&gt; #Columns<br>
&gt; #       Source          Destination             Description<br>
&gt; #       Column          Column<br>
&gt; #               28                      3                       Responsible<br>
&gt; Tech<br>
&gt; #               55                      5                       Tech Sat<br>
&gt; Score<br>
&gt; #               57                      6                       Overall Sat<br>
&gt; Score<br>
&gt; #<br>
&gt; foreach my $row (2..$LastRow) #skip header row on row 1<br>
&gt; {<br>
&gt;        #check the responsible tech<br>
&gt;        foreach my $t (@ArrayOfNames)<br>
&gt;        {<br>
&gt;                my $cellObj = $srcSheet-&gt;Cells($row,28);<br>
&gt;                print &quot;Current:  $t  \t Incident tech:  $cellObj-&gt;{Value} &quot;;<br>
&gt;<br>
&gt;                if ($t =~ m/$srcSheet-&gt;Cells($row,28)-&gt;{Value}/)<br>
&gt;                {<br>
&gt;                        print &quot;found a match!\n&quot;;<br>
&gt;                        if ($srcSheet-&gt;Cells($row,55)-&gt;{Value} &lt; 7 ||<br>
&gt; $srcSheet-&gt;Cells($row,57)-&gt;{Value} &lt; 7)<br>
&gt;                        {<br>
&gt;                                #copy data from source to destination<br>
&gt;                        }<br>
&gt;                }else{<br>
&gt;                        #print &quot;not a match \n&quot;;<br>
&gt;                        next;<br>
&gt;                }<br>
&gt;        }<br>
&gt; }<br>
&gt;<br>
&gt; My question:  With 113k rows to go through, Perl runs out of memory and the<br>
&gt; processing takes quite a while.  How can I be more efficient?<br>
&gt;<br>
&gt;<br>
&gt; John Warner<br>
&gt; <a href="mailto:jwarner@texas.net">jwarner@texas.net</a><br>
&gt; H:  512.251.1270<br>
&gt; C:  512.426.3813<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Austin mailing list<br>
&gt; <a href="mailto:Austin@pm.org">Austin@pm.org</a><br>
&gt; <a href="http://mail.pm.org/mailman/listinfo/austin" target="_blank">http://mail.pm.org/mailman/listinfo/austin</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Eric Ellington<br>
<a href="mailto:e.ellington@gmail.com">e.ellington@gmail.com</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Austin mailing list<br>
<a href="mailto:Austin@pm.org">Austin@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/austin" target="_blank">http://mail.pm.org/mailman/listinfo/austin</a><br>
</div></div></blockquote></div><br>