Hi Everyone !! I have a perl code which converts some pipe delimited csv files to xlsx files for our Unix box Solaris sparc server ! But the prob am stuck in is .. it is working well with files in MBytes but cant in GBytes size ending by sayin out of memory [RAM Size - 16GB, Perl v-5.8.4in-built version of solaris 10 and we could not upgrade it since its an client server 64bit-Solaris-OS] ! since the volume of our production data is large... we need this to be automated thro perl . Please suggest is there any solution for this prob ! this is the code i am using!!

use Excel::Writer::XLSX; my $workbook = Excel::Writer::XLSX->new("$PathAndFile1.xlsx"); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column('A:ED', 30); open(FH,"<$PathAndFile"); my ($row,$col) = (0,0); while (<FH>) # line-by-line it seems { chomp; my @list = split(/\|/,$_); foreach my $c (@list) { $worksheet->write($row, $col++, $c); $worksheet->freeze_panes( 1, 0 ); } $row++;$col=0; } close(FH); $workbook->close();

please help ! Thanks in advance !


In reply to Need help in reading csv files >1GB for converting into xlsx files in Solaris 10 - Perl v-5.8.4 by GT Learner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.