in reply to OT? Download to Excel number formats not working
foreach my $c (qw(col_endow col_gfund col_restr col_total)) { if ( substr($key,0,3) eq "010" || substr($key,0,3) eq "023" || substr($key,0,3) eq "025" || substr($key,0,3) eq "027" || substr($key,0,3) eq "030" || substr($key,0,3) eq "043" || substr($key,0,3) eq "045" || substr($key,0,3) eq "066" || substr($key,0,3) eq "097" ) { $row_data{num_style} = 'style="vnd.ms-excel.numberformat:$ +*
can be replaced by:
use List::MoreUtils qw(any); my @specials = qw(010 023 025 027 030 043 045 066 097); foreach my $c (qw(col_endow col_gfund col_restr col_total)) if (any { substr($key,0,3) eq $_ } @specials) { $row_data{num_style} = .....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Download to Excel number formats not working
by Lori713 (Pilgrim) on Aug 01, 2008 at 13:52 UTC |