Thanks for your extra ordinary help guys.
Actually, I already run similar type of script which
created a spreadsheet with maximum member of rows and
columns, the file size was 136 MB, it worked fine. 
Now you can conclude there is something wrong with my
script. However, when the script read a txt file with
around 19K/20K rows, and create a spreadsheet out of
it (with same number of rows & columns) worked
perfectly, but when I use a txt file with around 24K
rows, that’s when the problem occurs. It doesn’t give
any error message while running, but when I try to
open the generated spreadsheet file, it opened with
some error message.  I really don’t have any clue
what’s going on.

--- Chas Owens <[EMAIL PROTECTED]> wrote:

> On 7/16/07, Chas Owens <[EMAIL PROTECTED]> wrote:
> > On 7/16/07, a_arya2000 <[EMAIL PROTECTED]>
> wrote:
> > > By the way, my file size around 22 MB so, is it
> > > possible that Spreadsheet::WriteExcel::Big is
> not good
> > > enough for this size?
> > snip
> >
> > What follows is a test script you can use to
> determine if it is your
> > code or Spreadsheet::WriteExcel::Big (or possibly
> Excel) that is at
> > fault.  When run it will create a file that is
> roughly 21 megs in
> > size.  The size can be increased or decreased by
> modifying
> > $string_size.  If Excel can open the file then
> your code is at fault,
> > if it gives you the same error then your version
> of either
> > Spreadsheet::WriteExcel::Big or Excel has a bug.
> snip
> 
> I didn't like the program, so I changed it to be
> faster and more predictable.
> 
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> 
> use Spreadsheet::WriteExcel::Big;
> 
> my $string_size = 300;
> 
> my $wb   =
> Spreadsheet::WriteExcel::Big->new('test.xls');
> my $ws   = $wb->add_worksheet();
> my $data = 'a' x $string_size;
> for my $row (1 .. 65536) { #every row in an excel
> spread sheet
>         $ws->write("A$row", scalar reverse $data++);
> }
> $wb->close;
> 



      
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to