/[webpac2]/trunk/lib/WebPAC/Input/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/Input/Excel.pm

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

revision 728 by dpavlin, Fri Sep 29 19:52:26 2006 UTC revision 1105 by dpavlin, Mon Aug 4 19:35:23 2008 UTC
# Line 9  use base qw/WebPAC::Common/; Line 9  use base qw/WebPAC::Common/;
9    
10  =head1 NAME  =head1 NAME
11    
12  WebPAC::Input::Excel - support for Microsoft Excell and compatibile files  WebPAC::Input::Excel - support for Microsoft Excel and compatibile files
13    
14  =head1 VERSION  =head1 VERSION
15    
# Line 96  Return record with ID C<$mfn> from datab Line 96  Return record with ID C<$mfn> from datab
96    
97    my $rec = $self->fetch_rec( $mfn );    my $rec = $self->fetch_rec( $mfn );
98    
99  }  Columns are named C<A>, C<B> and so on...
100    
101  =cut  =cut
102    
# Line 118  sub fetch_rec { Line 118  sub fetch_rec {
118          $log->debug("fetch_rec( $mfn ) row: $row cols: ",$sheet->{MinCol}," - ",$sheet->{MaxCol});          $log->debug("fetch_rec( $mfn ) row: $row cols: ",$sheet->{MinCol}," - ",$sheet->{MaxCol});
119    
120          foreach my $col ( $sheet->{MinCol} ... $sheet->{MaxCol} ) {          foreach my $col ( $sheet->{MinCol} ... $sheet->{MaxCol} ) {
121                  if (my $v = $sheet->{Cells}->[$row]->[$col]->{Val}) {                  if (my $v = $sheet->{Cells}->[$row]->[$col]->{_Value}) {        ## XXX _Value = formatted | Val = unformated !
122                          $rec->{ int2col($col) } = $v;                          $rec->{ int2col($col) } = $v;
123                  }                  }
124          }          }
# Line 141  sub size { Line 141  sub size {
141          my $self = shift;          my $self = shift;
142          return $self->{size};          return $self->{size};
143  }  }
144    
145    sub default_encoding { 'UTF-16' }
146    
147  =head1 AUTHOR  =head1 AUTHOR
148    
149  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>

Legend:
Removed from v.728  
changed lines
  Added in v.1105

  ViewVC Help
Powered by ViewVC 1.1.26