Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Spreadsheet::XLSX date format problem
by Bethany (Scribe) on Jul 11, 2014 at 15:50 UTC | |
by Anonymous Monk on Jul 11, 2014 at 19:17 UTC | |
by Bethany (Scribe) on Jul 11, 2014 at 19:46 UTC | |
by keithneargarder (Initiate) on Aug 12, 2014 at 18:39 UTC | |
by Bethany (Scribe) on Aug 13, 2014 at 00:49 UTC | |
|
Re: Spreadsheet::XLSX date format problem
by Corion (Patriarch) on Jul 11, 2014 at 14:27 UTC | |
by Anonymous Monk on Jul 11, 2014 at 14:47 UTC | |
|
Re: Spreadsheet::XLSX date format problem
by Anonymous Monk on Jul 11, 2014 at 15:07 UTC | |
by Anonymous Monk on Jul 11, 2014 at 15:28 UTC |