ColtsFoot has asked for the wisdom of the Perl Monks concerning the following question:
What I want is for the leading zeros to be maintained. So I created a format99000123 98001234 00000050 01000123 02003445
When I look at the spreadsheet in M$ Excel the column contains the followingmy $workbook = Spreadsheet::WriteExcel->new($file); my $wb = $workbook->addworksheet('Current Students'); my $format = $workbook->addformat(); $format->set_num_format('@'); my $i = 0; while (my @row = $sth->fetchrow_array()) { my $j = 0; foreach my $item (@row) { if ($j == 0) { $wb->write($i, $j, $item, $format); } else { $item = lc($item); $wb->write($i, $j, &capitalize($item)); } $j++; } $i++; }
All the leading zeros have gone. Please can someone tell me what I am missing.99000123 98001234 50 1000123 2003445
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing a number to a cell using Spreadsheet::WriteExcel
by rdfield (Priest) on Oct 25, 2002 at 10:09 UTC | |
by ColtsFoot (Chaplain) on Oct 25, 2002 at 10:16 UTC | |
by rdfield (Priest) on Oct 25, 2002 at 10:46 UTC | |
|
Re: Writing a number to a cell using Spreadsheet::WriteExcel
by jmcnamara (Monsignor) on Oct 25, 2002 at 14:20 UTC | |
|
Re: Writing a number to a cell using Spreadsheet::WriteExcel
by sch (Pilgrim) on Oct 25, 2002 at 10:06 UTC |