sub xlsx_get { my $file_to_parse = shift; my @values; my $excel = Spreadsheet::XLSX -> new ($file_to_parse) or die "could not read the excel: $@$!"; foreach my $sheet (@{$excel -> {Worksheet}}) { $sheet -> {MaxRow} ||= $sheet -> {MinRow}; # Skip worksheet if it doesn't contain data. next if $sheet -> {MinRow} > $sheet -> {MaxRow}; my $c=0; foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { $c++; $sheet -> {MaxCol} ||= $sheet -> {MinCol}; my $name_xlsx = $sheet->{Cells}[$row][0]->{Val}; my $date_xlsx = $sheet->{Cells}[$row][1]->{Val}; # Skip if it doesn't contain data. next unless $name_xlsx; # log for test date format warn $date_xlsx; push @values, [ $name_xlsx, $date_xlsx ]; } } return \@values; } # end sub xlsx_get