#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Spreadsheet::Read;
my $book = ReadData("test.xlsx");
my $sheet = $book->[1]; # first data sheet
my @rows = Spreadsheet::Read::rows ($book->[1]);
print Dumper \@rows;
__END__
$ perl test.pl
$VAR1 = [
[
'AA1',
'BB1'
],
[
undef,
undef
],
[
111,
101
],
[
222,
202
],
[
333,
303
],
[
444,
404
],
[
555,
505
],
[
666,
606
],
[
777,
707
],
[
888,
808
],
[
999,
909
]
];
####
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Spreadsheet::Read;
my $book = ReadData("test.xlsx");
my $sheet = $book->[1]; # first data sheet
my @column = $sheet->{cell}[2]; # 2nd column, unformatted
print Dumper \@column;
__END__
$ perl test.pl
$VAR1 = [
[
undef,
'BB1',
undef,
101,
202,
303,
404,
505,
606,
707,
808,
909
]
];
####
use feature 'say';
foreach my $row (@column) {
for (@$row) { say $_ if (defined) }
}