1 package Finance::Bank::BR::Santander::Spreadsheet;
6 =head1 COPYRIGHT AND LICENSE
8 Copyright (C) 2015 Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
10 This program is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License; either version 2 of the License,
12 or (at your option) any later version.
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE.
20 use Spreadsheet::ParseExcel::Simple;
34 $self->{statement} = [];
40 my @sheets = $xls->sheets;
41 my $sheet = $sheets[0];
42 if ($sheet->has_data) {
43 my @header = $sheet->next_row;
45 while ($sheet->has_data) {
46 my @line = $sheet->next_row;
52 'balance' => $line[5],
54 push @{$self->{statement}}, $obj;
55 $self->{balance} = $line[5];
62 if (defined($filename)) {
63 my $xls = Spreadsheet::ParseExcel::Simple->read($filename);
73 return $self->{balance};
78 return $self->{statement};