line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::TableReader::Decoder::XLS; |
2
|
|
|
|
|
|
|
$Data::TableReader::Decoder::XLS::VERSION = '0.010'; |
3
|
1
|
|
|
1
|
|
545
|
use Moo 2; |
|
1
|
|
|
|
|
22
|
|
|
1
|
|
|
|
|
6
|
|
4
|
1
|
|
|
1
|
|
437
|
use Carp; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
250
|
|
5
|
|
|
|
|
|
|
extends 'Data::TableReader::Decoder::Spreadsheet'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @xls_probe_modules= qw( Spreadsheet::ParseExcel ); |
8
|
|
|
|
|
|
|
our $default_xls_module; |
9
|
|
|
|
|
|
|
sub default_xls_module { |
10
|
2
|
|
66
|
2
|
1
|
138
|
$default_xls_module ||= |
11
|
|
|
|
|
|
|
Data::TableReader::Decoder::_first_sufficient_module('XLS parser', \@xls_probe_modules); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# ABSTRACT: Access sheets/rows of a Microsoft Excel '97 workbook |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _build_workbook { |
18
|
1
|
|
|
1
|
|
11
|
my $self= shift; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
14
|
my $wbook; |
21
|
1
|
|
|
|
|
9
|
my $f= $self->file_handle; |
22
|
1
|
50
|
33
|
|
|
15
|
if (ref $f and ref($f)->can('worksheets')) { |
23
|
0
|
|
|
|
|
0
|
$wbook= $f; |
24
|
|
|
|
|
|
|
} else { |
25
|
1
|
|
|
|
|
5
|
$wbook= $self->default_xls_module->new->parse($f, $self->xls_formatter); |
26
|
|
|
|
|
|
|
} |
27
|
1
|
50
|
|
|
|
38972
|
defined $wbook or croak "Can't parse file '".$self->file_name."'"; |
28
|
1
|
|
|
|
|
11
|
return $wbook; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |