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