/[webpac2]/trunk/lib/WebPAC/Output/Excel.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Output/Excel.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1070 by dpavlin, Tue Nov 27 23:54:45 2007 UTC revision 1071 by dpavlin, Wed Nov 28 00:01:34 2007 UTC
# Line 16  line Line 16  line
16    
17  use Spreadsheet::WriteExcel;  use Spreadsheet::WriteExcel;
18  use File::Slurp;  use File::Slurp;
19    use Encode qw/decode/;
20    
21  =head1 NAME  =head1 NAME
22    
# Line 111  sub add { Line 112  sub add {
112    
113          my $worksheet = $self->worksheet || $log->logconfess("no worksheet?");          my $worksheet = $self->worksheet || $log->logconfess("no worksheet?");
114          foreach my $col ( sort grep { /^[A-Z]/ } keys %$hash ) {          foreach my $col ( sort grep { /^[A-Z]/ } keys %$hash ) {
115                  my $val = $hash->{$col};                  # FIXME internal WebPAC encoding is ISO-8859-2
116                    my $val = decode('ISO-8859-2', $hash->{$col});
117                  $log->debug("$col$l|$val");                  $log->debug("$col$l|$val");
118                  $worksheet->write( $col . $l , $val );                  $worksheet->write( $col . $l , $val );
 #                       || $log->logdie("can't add ", $col, $l, '|', $val, ": $!");  
119                  $cols++;                  $cols++;
120          }          }
121    

Legend:
Removed from v.1070  
changed lines
  Added in v.1071

  ViewVC Help
Powered by ViewVC 1.1.26