Maybe this example will help you.
#!/usr/bin/perl
use strict;
use warnings;
use Spreadsheet::XLSX;
my $excel = Spreadsheet::XLSX -> new ('d:\\book1.xlsx');
my $line;
foreach my $sheet (@{$excel -> {Worksheet}}) {
printf("Sheet: %s\n", $sheet->{Name});
$sheet -> {MaxRow} ||= $sheet -> {MinRow};
foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) {
$sheet -> {MaxCol} ||= $sheet -> {MinCol};
foreach my $col ($sheet -> {MinCol} .. $sheet -> {MaxCol}) {
my $cell = $sheet -> {Cells} [$row] [$col];
if ($cell) {
$line .= "\"".$cell -> {Val}."\",";
}
}
chomp($line);
print "$line\n";
$line = '';
}
}